Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Hide all images on userform

Upon initializing, I need to set the visible property for
all images on a user form (named "Game") to false. Having
trouble. Thx.
Jason
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Hide all images on userform

A very easy way is to do that while you're still in design mode... just
select them all, and set the Visible property to False.

--
Regards,

Juan Pablo González

"Jason Morin" wrote in message
...
Upon initializing, I need to set the visible property for
all images on a user form (named "Game") to false. Having
trouble. Thx.
Jason



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Hide all images on userform

Dim ctrl as Control
for each ctrl in Game.Controls
if typeof ctrl is MSForms.Image
then ctrl.Visible = False
end if
Next

--
Regards,
Tom Ogilvy

"Jason Morin" wrote in message
...
Upon initializing, I need to set the visible property for
all images on a user form (named "Game") to false. Having
trouble. Thx.
Jason



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default Hide all images on userform

Hi Jason,

As Juan Pablo noted, you can accomplish this at design time. Here's how you
could do it at runtime:

Private Sub UserForm_Initialize()
Dim ctl As Control

For Each ctl In Controls
If TypeOf ctl Is MSForms.Image _
Then ctl.Visible = False
Next ctl
End Sub

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Jason Morin wrote:
Upon initializing, I need to set the visible property for
all images on a user form (named "Game") to false. Having
trouble. Thx.
Jason


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cycle through images on UserForm cdb Excel Discussion (Misc queries) 1 January 28th 05 12:46 AM
Global value does not retain value when UserForm is hide Alex[_15_] Excel Programming 1 November 4th 03 10:03 AM
Userform.hide / show papou[_7_] Excel Programming 0 September 15th 03 03:12 PM
Hide/Show modeless userform when activating/deactivating workbooks Jeremy Gollehon[_2_] Excel Programming 0 August 28th 03 11:05 PM
hide a textbox on a userform? Bill Lunney Excel Programming 2 July 31st 03 08:57 AM


All times are GMT +1. The time now is 02:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"