ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Holding a constant page while the macro runs in the background (https://www.excelbanter.com/excel-programming/414022-holding-constant-page-while-macro-runs-background.html)

Joe Mac

Holding a constant page while the macro runs in the background
 
Hello all...

I've got a macro the performs multiple file open steps and copies range data
back and forth between pages on alternating workbooks... the macro works
fine... what I'm looking to do is to hold a constant page while the macro
steps operate in the background and when all steps are completed, then to pop
a message box indicating that the file has been updated... any help would be
appreciated
--

Joe Mac

FSt1

Holding a constant page while the macro runs in the background
 
hi
add two lines of code.
at the beginning...
application.screenupdating = false
then at the end...
application.screenupdating = false
msgbox "updated"
end sub

regards
FSt1

"Joe Mac" wrote:

Hello all...

I've got a macro the performs multiple file open steps and copies range data
back and forth between pages on alternating workbooks... the macro works
fine... what I'm looking to do is to hold a constant page while the macro
steps operate in the background and when all steps are completed, then to pop
a message box indicating that the file has been updated... any help would be
appreciated
--

Joe Mac


Office_Novice

Holding a constant page while the macro runs in the background
 
Try...
at the start of your procedure place
Application.Screenupdating = False

& just above "End Sub"
Application.Screenupdating = True
msgbox "Completed Update"

"Joe Mac" wrote:

Hello all...

I've got a macro the performs multiple file open steps and copies range data
back and forth between pages on alternating workbooks... the macro works
fine... what I'm looking to do is to hold a constant page while the macro
steps operate in the background and when all steps are completed, then to pop
a message box indicating that the file has been updated... any help would be
appreciated
--

Joe Mac


RyanH

Holding a constant page while the macro runs in the background
 
This should do it for you.

Sub YourMacro()

Application.ScreenUpdating = False

'your code

MsgBox "The file has been updated."

Application.ScreenUpdating = True

End Sub
--
Cheers,
Ryan


"Joe Mac" wrote:

Hello all...

I've got a macro the performs multiple file open steps and copies range data
back and forth between pages on alternating workbooks... the macro works
fine... what I'm looking to do is to hold a constant page while the macro
steps operate in the background and when all steps are completed, then to pop
a message box indicating that the file has been updated... any help would be
appreciated
--

Joe Mac


Joe Mac

Holding a constant page while the macro runs in the background
 
Thank you - Exactly what I wanted in the performance
--

Joe Mac


"FSt1" wrote:

hi
add two lines of code.
at the beginning...
application.screenupdating = false
then at the end...
application.screenupdating = false
msgbox "updated"
end sub

regards
FSt1

"Joe Mac" wrote:

Hello all...

I've got a macro the performs multiple file open steps and copies range data
back and forth between pages on alternating workbooks... the macro works
fine... what I'm looking to do is to hold a constant page while the macro
steps operate in the background and when all steps are completed, then to pop
a message box indicating that the file has been updated... any help would be
appreciated
--

Joe Mac



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com