Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I added the code below given by Tom in my folder but it doesn't really work.
The strange thing is that when I run the macro several times in a row with the file open it works perfectly. But if I Close/Open Close/Open Close/Open, each time I open it gives the same message. Any idea on how to change this? By the way, is it possible to change the color of a msgbox? Thank you. "Tom Ogilvy" wrote: Private Sub Userform_Initialize() Dim rng as Range, i as Long Set rng = Sheets("sheet2").Range("A1:A5") i = Int(Rnd() * rng.Count + 1) me.Label1.Caption = rng(i).Value End Sub this should be in the userform module. -- Regards, Tom Ogilvy |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Initializing UserForm which uses MultiPage controls, part 2 | Excel Programming | |||
Initializing UserForm which uses MultiPage controls | Excel Programming | |||
stop userform from initializing | Excel Programming | |||
Initializing Combobox in a Userform | Excel Programming | |||
Initializing Userform | Excel Programming |