#1   Report Post  
Greg B
 
Posts: n/a
Default Naming userforms

Is there a cheat's way of changing the caption on many userform names in the
vb editor or do I have to go into them 1 by 1.

I have about 80 of them I need to change

Please advise

Greg



  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Hi Greg,

Here's some code that shows you an approach.

Dim oVBMod As VBComponent
Dim i As Long

With ActiveWorkbook.VBProject
For Each oVBMod In .VBComponents
If oVBMod.Type = vbext_ct_MSForm Then
i = i + 1
oVBMod.Properties("Caption") = "myForm" & i
End If
Next oVBMod
End With

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Greg B" wrote in message
...
Is there a cheat's way of changing the caption on many userform names in

the
vb editor or do I have to go into them 1 by 1.

I have about 80 of them I need to change

Please advise

Greg





  #3   Report Post  
Greg B
 
Posts: n/a
Default

Thanks Bob

I have so many items which use the same caption

I was going mad typing the same thing

Thanks Again
Greg


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
Naming ranges? pmw5 Excel Discussion (Misc queries) 2 March 4th 05 06:57 PM
Naming Ranges Simon Shaw Excel Discussion (Misc queries) 1 February 15th 05 01:17 AM
Naming column in Index Function mlkpied Excel Worksheet Functions 3 December 7th 04 12:20 AM
Naming a (date) constant David Excel Worksheet Functions 4 November 29th 04 06:09 PM
Naming & renaming a sheet tab Cgbilliar Excel Worksheet Functions 1 November 7th 04 05:57 PM


All times are GMT +1. The time now is 05:50 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"