Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Re-show userform after closing file - code help
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. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Re-show userform after closing file - code help
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. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Re-show userform after closing file - code help
Thanks! That helped solve.
-- Thanks, Gerry O. "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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Userform won't show when file re-opened | Excel Discussion (Misc queries) | |||
How to code on Macro on saving and closing a file? | Excel Worksheet Functions | |||
Resume.xlw and closing workbook with VBA code. | Excel Discussion (Misc queries) | |||
Properties window show nothing for a userform | Excel Discussion (Misc queries) | |||
Closing the VBA Editor using code | Excel Worksheet Functions |