Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Updating .tag in Userform Control in VBA

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?
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
userform for updating records Terry Excel Discussion (Misc queries) 2 August 27th 08 04:16 PM
control toolbox and userform toolbars in XL 03 Dave F[_2_] Excel Discussion (Misc queries) 2 August 8th 07 08:04 AM
Control code behavior with userform ? steve Excel Programming 0 July 30th 03 05:01 PM
UserForm Control John Wilson Excel Programming 0 July 16th 03 06:53 PM
UserForm Control Richard Choate Excel Programming 0 July 16th 03 06:50 PM


All times are GMT +1. The time now is 09:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"