ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Move data from Doc1 to Doc2, end with 2nd doc open (https://www.excelbanter.com/excel-programming/439967-move-data-doc1-doc2-end-2nd-doc-open.html)

munchkin

Move data from Doc1 to Doc2, end with 2nd doc open
 
Here's a quick synopsis of my macro - Macro is run from Doc1, which opens up
Doc2, then returns to Doc1 & does a series of coping & pasting into Doc2.

When the macro is done Doc2 should remain open for the user so they can see
the message box, but both documents are automatically minimized when the
macro is done. How do I keep Doc2 from minimizing?


Application.WindowState = xlMinimized

Range("H2").Select
Selection.Copy


Range("E1").Select
ActiveSheet.Paste

MsgBox ("The list was moved to Doc2. You need rename Doc2 when saving
and closing.")


End Sub


munchkin

Move data from Doc1 to Doc2, end with 2nd doc open
 
FYI - I already figured this one out.

"Munchkin" wrote:

Here's a quick synopsis of my macro - Macro is run from Doc1, which opens up
Doc2, then returns to Doc1 & does a series of coping & pasting into Doc2.

When the macro is done Doc2 should remain open for the user so they can see
the message box, but both documents are automatically minimized when the
macro is done. How do I keep Doc2 from minimizing?


Application.WindowState = xlMinimized

Range("H2").Select
Selection.Copy


Range("E1").Select
ActiveSheet.Paste

MsgBox ("The list was moved to Doc2. You need rename Doc2 when saving
and closing.")


End Sub



All times are GMT +1. The time now is 10:29 PM.

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