userform.image. visibly = false how best to do it ?

Darkforce

New Member
Joined
Mar 4, 2020
Messages
20
Office Version
  1. 365
Platform
  1. Windows
I need to turn them all off.. is the a better way?


UserForm1.Image1.Visible = False
UserForm1.Image2.Visible = False
UserForm1.Image3.Visible = False
UserForm1.Image4.Visible = False
UserForm1.Image5.Visible = False
UserForm1.Image6.Visible = False
UserForm1.Image7.Visible = False
UserForm1.Image8.Visible = False
UserForm1.Image9.Visible = False
UserForm1.Image10.Visible = False
UserForm1.Image11.Visible = False
UserForm1.Image12.Visible = False
UserForm1.Image13.Visible = False
UserForm1.Image14.Visible = False
UserForm1.Image15.Visible = False
UserForm1.Image16.Visible = False
UserForm1.Image17.Visible = False
UserForm1.Image18.Visible = False
UserForm1.Image19.Visible = False
UserForm1.Image20.Visible = False
UserForm1.Image21.Visible = False
UserForm1.Image22.Visible = False
UserForm1.Image23.Visible = False
UserForm1.Image24.Visible = False
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Code:
dim n as long
for n = 1 to 24
userform1.controls("Image" & n).visible = false
next n

should do the trick.
 
Upvote 0
Solution

Forum statistics

Threads
1,224,574
Messages
6,179,633
Members
452,933
Latest member
patv

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top