C
Chan
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?
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?