Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
import new Userform2 w/o overwriting existing Userform2?
Hi All,
I'd like to import a new "userform2" without overwriting my existing userform2. Is there a facile way to do this? It doesn't seem like you can rename a userform. ? Gil http://www.TenSecondMedicalRecord.com |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
import new Userform2 w/o overwriting existing Userform2?
If you don't get an answer here, try posting in
microsoft.public.word.vba.userforms. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "gils usenet acct" wrote in message ... Hi All, I'd like to import a new "userform2" without overwriting my existing userform2. Is there a facile way to do this? It doesn't seem like you can rename a userform. ? Gil http://www.TenSecondMedicalRecord.com |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
import new Userform2 w/o overwriting existing Userform2?
Using the vba editor (Alt-F11) you can rename your UserForm. You need the
properties window open. Click on the userform and in the properties, the first one will be name. You can change this. Note, you may have code elsewhere that calls the userform by name. You'll need to update that. -- Charles Kenyon Word New User FAQ & Web Directory: http://addbalance.com/word Intermediate User's Guide to Microsoft Word (supplemented version of Microsoft's Legal Users' Guide) http://addbalance.com/usersguide See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome! --------- --------- --------- --------- --------- --------- This message is posted to a newsgroup. Please post replies and questions to the newsgroup so that others can learn from my ignorance and your wisdom. "gils usenet acct" wrote in message ... Hi All, I'd like to import a new "userform2" without overwriting my existing userform2. Is there a facile way to do this? It doesn't seem like you can rename a userform. ? Gil http://www.TenSecondMedicalRecord.com |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
import new Userform2 w/o overwriting existing Userform2?
You cannot have two userform2's - you must rename one or the other.
It's easy enough to rename the one you have in your project - just enter a new name in the properties window - but (perhaps not quite so easy) remember to change any references to it in your code as well. Slightly more involved but perhaps a better solution is to edit the form you want to import. Exported userforms consist of two files - userform2.frm and (by default) userform2.frx - the key file is the one with the frm extension. It is just a text file and you can edit it in notepad. It will look something like this: VERSION 5.00 Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} UserForm2 Caption = "UserForm2" ClientHeight = 3120 ClientLeft = 45 ClientTop = 435 ClientWidth = 4710 OleObjectBlob = "UserForm2.frx":0000 StartUpPosition = 1 'CenterOwner End Attribute VB_Name = "UserForm2" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False The name of the Userform is on the line which starts "Begin" - change this to your new name The name of the Code module is on the line which begins Attribute VB_Name - this *MUST* be the same as the name of the userform so change it as well. That is all you need to do. Save the file and then do your import. It would perhaps be better to do a bit more if you are planning on using it more than once - otherwise it will end up being a source of confusion - but for a one-off that is sufficient. -- Enjoy, Tony "gils usenet acct" wrote in message ... Hi All, I'd like to import a new "userform2" without overwriting my existing userform2. Is there a facile way to do this? It doesn't seem like you can rename a userform. ? Gil http://www.TenSecondMedicalRecord.com |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
import new Userform2 w/o overwriting existing Userform2?
Thanks All, ... sometimes it can be in plain view and still no obvious. But thank you and I've got it. I think I was getting twisted for two reasons. One, I would have thought right clicking on the name of the userform under Project would have been the route. Two, the presence of the UserForm caption name in addition to the UserForm name must have confused me.
As Always, Thanks ! Gil http://www.TenSecondMedicalRecord.com "Tony Jollans" My Forename at My Surname dot com wrote in message ... You cannot have two userform2's - you must rename one or the other. It's easy enough to rename the one you have in your project - just enter a new name in the properties window - but (perhaps not quite so easy) remember to change any references to it in your code as well. Slightly more involved but perhaps a better solution is to edit the form you want to import. Exported userforms consist of two files - userform2.frm and (by default) userform2.frx - the key file is the one with the frm extension. It is just a text file and you can edit it in notepad. It will look something like this: VERSION 5.00 Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} UserForm2 Caption = "UserForm2" ClientHeight = 3120 ClientLeft = 45 ClientTop = 435 ClientWidth = 4710 OleObjectBlob = "UserForm2.frx":0000 StartUpPosition = 1 'CenterOwner End Attribute VB_Name = "UserForm2" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False The name of the Userform is on the line which starts "Begin" - change this to your new name The name of the Code module is on the line which begins Attribute VB_Name - this *MUST* be the same as the name of the userform so change it as well. That is all you need to do. Save the file and then do your import. It would perhaps be better to do a bit more if you are planning on using it more than once - otherwise it will end up being a source of confusion - but for a one-off that is sufficient. -- Enjoy, Tony "gils usenet acct" wrote in message ... Hi All, I'd like to import a new "userform2" without overwriting my existing userform2. Is there a facile way to do this? It doesn't seem like you can rename a userform. ? Gil http://www.TenSecondMedicalRecord.com |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is there any way to import data into an existing template? | Microsoft Word Help |