LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default Userform won't show after closing another file

I have two files. First file runs through a userid/password validation then
gives user a list of files to open on userform. After selection, userform is
hidden (me.hide), second file opens. User makes changes, etc. Command
button gives user option on second file to close & save changes and reshow
the userform on first file to make another selection. After saving changes
and closing on second file, userform on first file should be re-shown. My
current code does close and save the file, but when focus returns to first
file, userform is not visible.

Here is code to close second file and return to first file:

Private Sub Show_Cost_Center()

Application.Run ("HideAll")
Return_Cost_Center.Show vbModeless

End Sub

Here is code on first file to re-show the userform:

Private Sub cmbSelectNew_Click()

Application.ScreenUpdating = False
Unload Me
Application.EnableEvents = True
Application.Run ("MainHideAll")
Windows("Main Menu").Visible = True
ThisWorkbook.gMacro = True
Application.ScreenUpdating = True
Application.Run "'ABS Open v2.0.xls'!Show_Cost_Center"
ThisWorkbook.Close savechanges:=True

End Sub

Any help would be appreciated!

--
Thanks,

Gerry O.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re-show userform after closing file - code help Gerry O Excel Discussion (Misc queries) 3 September 4th 07 10:52 PM
Userform won't show when file re-opened Gerry O Excel Discussion (Misc queries) 2 September 4th 07 05:42 PM
How to skip the save file notoification on file closing? Dan Excel Worksheet Functions 1 August 19th 07 02:26 PM
File Says Read Only Even After Closing It Dileep Chandran Excel Discussion (Misc queries) 3 October 31st 06 07:01 PM
Properties window show nothing for a userform Cheer-Phil-ly Excel Discussion (Misc queries) 0 July 27th 06 07:15 PM


All times are GMT +1. The time now is 02:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"