Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
renaming array of controls
from the default CommandButton1,2,3........100.
to MyCmb1,2,3.....100 I tried Dim x As Single For x = 1 To 100 Controls("CommandButton" & x).Name = "MyCmb" & x Next x error "Can't set at runtime" how else can I quickly change these? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
renaming array of controls
I would assume that if the property cannot be set at runtime, there is no
way of doing it. If you are just trying to effect a mass change, you can do it at design-time using the syntax: ThisWorkbook.VBProject.VBComponents("UserForm1").D esigner _ ..Controls("CommandButton1").Name = "MyCmb1" and looping through the collection. -- Vasant "Jason" wrote in message ... from the default CommandButton1,2,3........100. to MyCmb1,2,3.....100 I tried Dim x As Single For x = 1 To 100 Controls("CommandButton" & x).Name = "MyCmb" & x Next x error "Can't set at runtime" how else can I quickly change these? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
meaning of : IF(Switch; Average(array A, array B); array A) | Excel Worksheet Functions | |||
ActiveX Controls vs Form Controls | Excel Discussion (Misc queries) | |||
excel VBA set array controls | Excel Programming | |||
Renaming | Excel Programming | |||
Renaming within VBA | Excel Programming |