ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   merging workbooks with userforms (https://www.excelbanter.com/excel-programming/448857-merging-workbooks-userforms.html)

Laurence Lombard

merging workbooks with userforms
 
I would like to combine two workbooks but besides macros, they both have
userforms with the same name (eg userform1). How do I prepare the
workbooks before combining so that the userforms with the same
designation/name do not overwrite each other. I tried changing the
userform name and caption (in userform properties) but the macros that
called the userform did not like that (even if I changed the name in the
call procedure)

GS[_2_]

merging workbooks with userforms
 
I would like to combine two workbooks but besides macros, they both
have userforms with the same name (eg userform1). How do I prepare
the workbooks before combining so that the userforms with the same
designation/name do not overwrite each other. I tried changing the
userform name and caption (in userform properties) but the macros
that called the userform did not like that (even if I changed the
name in the call procedure)


Renaming the objects should be sufficient so long as you change any
code refs to the new name. (It may even be as simple as changing the
numeric suffix) You may want to do this *before* importing the code
module[s] and userform, though, so you can take advantage of the
Replace function (Ctrl+H) in the VBE.

If you *think* you've already done this and it hasn't worked then I
suspect you didn't do it right!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion




All times are GMT +1. The time now is 09:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com