Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to adjust the tag property of approx. 150
different controls in a userform using a list from an excel spreadsheet. I wrote the following code to do this: For Each Ctl In Main.Controls With Range("Controls") Set x = .Find(Ctl.Name, lookat:=xlWhole) If Not x Is Nothing Then Ctl.Tag = x.Offset(0, 1).Value End If End With Next Ctl --"Controls" is the list of controls with the tag I want entered in the neighboring column If I step through the code, it seems to pull information correctly...I am able to see which control is being pulled up, what the value of the tag should be set to, even the Ctl.Tag seems to correct...but for some reason, the tag is not adjusted in the form when the macro finishes. Anyone have any ideas? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Chan,
No you will never change the default state of the tags in code, but by putting it in the initialize event it will always be there whilst the form is active. The other thing is to hide the form not unload it as suggested, that way even if the form is not visible it is in memory and the tags will persist for the time. -- HTH Bob Phillips "Chan" wrote in message ... Bob, Great insights. Thanks. By including the code in the form_initialize event, will the tags actually update, or will they just update until the form closes? Chan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
userform for updating records | Excel Discussion (Misc queries) | |||
control toolbox and userform toolbars in XL 03 | Excel Discussion (Misc queries) | |||
Control code behavior with userform ? | Excel Programming | |||
UserForm Control | Excel Programming | |||
UserForm Control | Excel Programming |