userforms

  • Thread starter Thread starter Randy
  • Start date Start date
R

Randy

I have a spreadsheet that uses userforms to input information along
with macros to move the data around. After the userform has been used
the data is cleared in the cells with a macro and the last command is
to hide the userform. When I re-activate the userform with a macro
the userform still has the information in it from the previous entry.
I can close the userform with the "X" in the top right corner and
re-activate again and the information is gone. I want the
information to be gone the first time I re-activate the userform.
 
Randy,

Unload the user form instead of just hiding it. E.g.,

Unload Me
' instead of
Me.Hide


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


Randy said:
I have a spreadsheet that uses userforms to input information along
with macros to move the data around. After the userform has been used
the data is cleared in the cells with a macro and the last command is
to hide the userform. When I re-activate the userform with a macro
the userform still has the information in it from the previous entry.
I can close the userform with the "X" in the top right corner and
re-activate again and the information is gone. I want the
information to be gone the first time I re-activate the
userform.
 
Make the last command to Unload the userform not hide it. Hide retains it in
memory, unload doesn't.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top