View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Ryan H Ryan H is offline
external usenet poster
 
Posts: 489
Default What does the Userform.Tag do?

The Tag property is String that can be used for anything you wish to help
identify any control. Most controls have them. To me it's kinda used as a
built in custom univerisal property.

In your case for example, lets say you have 3 userforms. Userfrom1 and
Userform2 have the Tag property set to "Run Code". Userform3 has nothing as
a Tag. Now lets say you want to run a procedure for all userforms with Tag =
"Run Code". You would put this in the Initialize Event of each userform.

Private Sub UserForm_Initialize()
If Me.Tag = "Run Code" Then Call MySub
End Sub

Hope this helps! If so, let me know, click "YES" below.
--
Cheers,
Ryan


"Brad E." wrote:

I am curious what the Tag part of a Userform is for?
--
Thanks, Brad E.