BonnyeLiz
05-04-2005, 07:44 AM
If a Userform is run in coordination with an AutoNew macro containing other code, why would it intercept the initial document created AGAIN if a user tried to run the template for another separate new document? Wow - let me clarify that inquiry further...
I open a template that has an autonew macro creating a new doc based on the template and also includes code that gives it a filenumber, path and filename. This template also pops a userform up for data placement into the new doc created.
Now, why (when I have gone through the userform, clicked "OK" and everything places in the document accordingly) does the new instance of the userform and template populate the first document instead of a new one? The file number, path, etc. are all populated again into the initial doc created, and the secondary document I'm trying to create now has no filename, numbers assigned to it.
I'm thinking it could have something to do with the WITH statement in the code referencing ActiveDocument? But that doesn't quite make sense to me either considering that the new instance should now be the active document.
Hmmm.... not sure if anyone will be able to understand what I'm trying to explain here, but I tried! LOL :bug:
I open a template that has an autonew macro creating a new doc based on the template and also includes code that gives it a filenumber, path and filename. This template also pops a userform up for data placement into the new doc created.
Now, why (when I have gone through the userform, clicked "OK" and everything places in the document accordingly) does the new instance of the userform and template populate the first document instead of a new one? The file number, path, etc. are all populated again into the initial doc created, and the secondary document I'm trying to create now has no filename, numbers assigned to it.
I'm thinking it could have something to do with the WITH statement in the code referencing ActiveDocument? But that doesn't quite make sense to me either considering that the new instance should now be the active document.
Hmmm.... not sure if anyone will be able to understand what I'm trying to explain here, but I tried! LOL :bug: