Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Nov 2005
    Location
    London, Gtr London, United Kingdom
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Multiple Image on a Userform Button (VBA/Powerpoint/2000)

    Sorry... me again. I promise you there is quite a lot I work out for myself!!! but i'm a bit stuck here.

    what i was wondering is..... I've created a userform that has a grid of toggle buttons with gifs on them which have various functions depending on what combination they are depressed. But what i am finding is that sometimes it's quite hard to notice if the toggle is up or down. so the way round this would be to have one image while its value is false, and another for True (i.e. a tick). The image for the Toggles False position is easy enough by using the properties when building the button, but when it's true i'm having to use the following code:-

    If ToggleButton1.Value = True Then
    ToggleButton1.Picture = LoadPicture("C:image.gif")

    What i was wondering is, if it is possible to somehow embed the image.gif into the form and refer to it from there, so as when the add-in gets distributed, I don't need to worry about all the extra little gifs and things?

    Many thanks

    Thom

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 Posts

    Re: Multiple Image on a Userform Button (VBA/Powerpoint/2000)

    You could create a series of controls with the pictures you need (for example Image controls), and set their Visible property to False. You can then use code like

    If Me.ToggleButton1.Value = True Then
    Me.ToggleButton1.Picture = Me.Image37.Picture
    Else
    Me.ToggleButton1.Picture = Me.Image38.Picture
    End If

    (BTW, questions are welcome! That's what the Lounge is for!)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •