G
Gerry O
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!
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!