2006-01-24, 12:30 #1
- Join Date
- Nov 2005
- London, Gtr London, United Kingdom
- 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?
Subscribe to our Windows Secrets Newsletter - It's Free!
Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!
+ Get this BONUS — free!
Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!
2006-01-24, 12:45 #2
- Join Date
- Mar 2002
- 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
Me.ToggleButton1.Picture = Me.Image38.Picture
(BTW, questions are welcome! That's what the Lounge is for!)