Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I hide the work excel does 1

Status
Not open for further replies.

wwgmr

MIS
Mar 12, 2001
174
US
This is sample of section that I want to run but I dont want user to see it when they exit. I want it to run in background and not be visable to user. Is this possible with command like
Application.ScreenUpdating = True
Application.ScreenUpdating = False
?? How would I insert it into this?
Thanks for help

Sub Out()

Dim lvResponse As Variant

Application.EnableCancelKey = xlDisabled
lvResponse = MsgBox("If you have not Saved or Sent this file you should note that you can only Save or Send by clicking either the SAVE or SEND Button, otherwise any changes you have made will be lost! Do still you wish to EXIT this file? ", vbYesNo + vbDefaultButton2, "File Exit Window")
If lvResponse = vbYes Then

Application.Run "'test of macros2.xls'!FIXIT"

ActiveWorkbook.Save

Reset
Application.Quit
Else
Exit Sub
End If
End Sub

Sub FIXIT()

Sheets("MacroTest").Visible = True
Sheets("MacroTest2").Visible = True
Sheets("Main").Visible = False
Sheets("branches").Visible = False
Sheets("Format").Visible = False
Sheets("get sheet").Visible = False
Sheets("send sheet").Visible = False
Sheets("users interface - P&L").Visible = False
Sheets("users interface").Visible = False
Sheets("Sheet1").Visible = False

Sheets("MacroTest2").Select

End Sub
 
Insert the ScreenUpdating = False before or after the Application.EnableCancelKey = xlDisabled statement. Reset it to True before Application.Quit and the Exit Sub statements. You should restore the setting before the exit points on your program.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top