View Single Post
 
Old 07-19-2023, 04:18 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,164
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 agree with Greg that bookmarks are a poor option for the placing of information but that is not where your particular problem is coming from.

From your listed items in post 6 above, it sounds like you are running this code in step 3 (outside the userform itself). This gives me the indication of where your problem is coming from.

If the userform is closed then the values you put in the userform are no longer available to other macros (which leads to an object doesn't exist error). While the txtName is available in the context of the Userform, it is not available to macros outside of the userform code if that userform is closed. If the userform was opened and then hidden (not closed) the value would be available but you would need to include a pointer to the userform's name (userformname.txtName.Text).
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote