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
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