View Single Post
 
Old 02-14-2022, 07:08 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,166
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

I can't see the code you have executing but the question is WHEN does the userform associated with doc2 initialised? If it initialises and populates the userform prior to the next line of code running then I would expect the userform for doc2 to show the initial value rather than the updated line

Set doc2 = Application.Documents.Add("C:\XXXX.dotm")
'does the userform load here or does it wait for the next line before loading it?
doc2.Variables("myinitials").Value = Me.TxtYourInitials.Value
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote