View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Re-show userform after closing file - code help

I'd swap those last two:

ActiveWorkbook.Save 'Saves the currently acitve book
ThisWorkbook.Activate 'brings back the workbbok running the code...
UserForm1.Show 'shows the userform that you hid



Jim Thomlinson wrote:

A little hard to comment without seeing any code however in general (assuming
you are not using workbook objects)

ActiveWorkbook.Save 'Saves the currently acitve book
UserForm1.Show 'shows the userform that you hid
ThisWorkbook.Activate 'brings back the workbbok running the code...

Note that if the code is all being run from the userform you could use

Me.Show to bring back the userform.
--
HTH...

Jim Thomlinson

"Gerry O" wrote:

Need a little help with some code. In one file, I have a userform with a
drop-down combobox from which a user selects an existing file to open. After
the file is opened, the userform is hid using me.hide. After making updates
to the file opened using the form, I need code to save the changes and
re-show the userform in the original file so the user can make another
selection or exit the userform.

Your help would be greatly appreciated!
--
Thanks,

Gerry O.


--

Dave Peterson