Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Naming UserForm CommandButtons using VBA
This is slightly different than something I asked yesterday. Unfortunately,
applying yesterday's solution method does not work for this. I'm trying to name a series of command buttons on a UserForm. Can you use code to name commandbuttons on a Userform? This is what I got which doesn't work. For i = 1 To 37 c = 38 UserForm3.Controls("CommandButton" & i).Name = "M" & c c = c + 1 Next i Thanks, Paul |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Naming UserForm CommandButtons using VBA
No you didn't, you asked how to set the caption. You cannot set the name
property at runtime, just like the error message told you. -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "PCLIVE" wrote in message ... This is slightly different than something I asked yesterday. Unfortunately, applying yesterday's solution method does not work for this. I'm trying to name a series of command buttons on a UserForm. Can you use code to name commandbuttons on a Userform? This is what I got which doesn't work. For i = 1 To 37 c = 38 UserForm3.Controls("CommandButton" & i).Name = "M" & c c = c + 1 Next i Thanks, Paul |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Naming UserForm CommandButtons using VBA
Thanks Bob,
I wasn't saying that this was the same question, which as you pointed out was dealing with setting the Caption properties. Your suggested solution yesterday was dead-on and helped me accomplish exactly what I wanted.. But I trying something different today, but still dealing with the UserForm CommandButton Properties. Anyway, I had a feeling that this one couldn't be done. As always, thanks for your help. Paul "Bob Phillips" wrote in message ... No you didn't, you asked how to set the caption. You cannot set the name property at runtime, just like the error message told you. -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "PCLIVE" wrote in message ... This is slightly different than something I asked yesterday. Unfortunately, applying yesterday's solution method does not work for this. I'm trying to name a series of command buttons on a UserForm. Can you use code to name commandbuttons on a Userform? This is what I got which doesn't work. For i = 1 To 37 c = 38 UserForm3.Controls("CommandButton" & i).Name = "M" & c c = c + 1 Next i Thanks, Paul |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Naming command buttons on a UserForm | Excel Programming | |||
CommandButtons | Excel Programming | |||
Using For/Next Loop To Generate 4 CommandButtons On A UserForm Results In A Runtime Error 91 | Excel Programming | |||
Naming buttons in Userform on the fly | Excel Programming | |||
Commandbuttons | Excel Programming |