Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro not finishing due to loading workbook
I have a macro that opens another workbook but it appears that the macro
fails to finish because it's almost like it's not waiting for it to load. Essentially this is what I'm doing: Workbook A is open Macro to open Workbook B (this takes a second to load therefore cancelling the rest of the macro) Copy selected text from B Close Workbook B Paste info on Workbook A Your help appreciated. -- David P. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro not finishing due to loading workbook
Post your code...
-- HTH... Jim Thomlinson "David P." wrote: I have a macro that opens another workbook but it appears that the macro fails to finish because it's almost like it's not waiting for it to load. Essentially this is what I'm doing: Workbook A is open Macro to open Workbook B (this takes a second to load therefore cancelling the rest of the macro) Copy selected text from B Close Workbook B Paste info on Workbook A Your help appreciated. -- David P. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro not finishing due to loading workbook
Macro to open Workbook B
How do you execute this macro? Keyboard shortcut? -- Jim "David P." wrote in message ... |I have a macro that opens another workbook but it appears that the macro | fails to finish because it's almost like it's not waiting for it to load. | Essentially this is what I'm doing: | | Workbook A is open | Macro to open Workbook B (this takes a second to load therefore cancelling | the rest of the macro) | Copy selected text from B | Close Workbook B | Paste info on Workbook A | | Your help appreciated. | -- | David P. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro not finishing due to loading workbook
Now I'm really going to confuse you. I'm assuming the macro stops running at
Workbooks.Open Filename:="C:\Windows Template.xls" . Sheets("P").Select Range("I13").Select Workbooks.Open Filename:="C:\Windows Template.xls" Sheets("2").Select Selection.Copy ActiveWindow.WindowState = xlMinimized ActiveWindow.WindowState = xlMaximized ActiveSheet.Paste ActiveWindow.WindowState = xlMinimized Windows("Windows Template.xls").Activate ActiveWindow.Close -- David P. "Jim Thomlinson" wrote: Post your code... -- HTH... Jim Thomlinson "David P." wrote: I have a macro that opens another workbook but it appears that the macro fails to finish because it's almost like it's not waiting for it to load. Essentially this is what I'm doing: Workbook A is open Macro to open Workbook B (this takes a second to load therefore cancelling the rest of the macro) Copy selected text from B Close Workbook B Paste info on Workbook A Your help appreciated. -- David P. |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro not finishing due to loading workbook
Yes, by keyboard shortcut.
-- David P. "Jim Rech" wrote: Macro to open Workbook B How do you execute this macro? Keyboard shortcut? -- Jim "David P." wrote in message ... |I have a macro that opens another workbook but it appears that the macro | fails to finish because it's almost like it's not waiting for it to load. | Essentially this is what I'm doing: | | Workbook A is open | Macro to open Workbook B (this takes a second to load therefore cancelling | the rest of the macro) | Copy selected text from B | Close Workbook B | Paste info on Workbook A | | Your help appreciated. | -- | David P. |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro not finishing due to loading workbook
Remove the shift key from the shortcut combination.
Holding down the shiftkey while you're opening a file tells excel not to run the workbook_open event or the auto_open procedure. And it confuses excel so that it never goes back to finish your code. David P. wrote: Yes, by keyboard shortcut. -- David P. "Jim Rech" wrote: Macro to open Workbook B How do you execute this macro? Keyboard shortcut? -- Jim "David P." wrote in message ... |I have a macro that opens another workbook but it appears that the macro | fails to finish because it's almost like it's not waiting for it to load. | Essentially this is what I'm doing: | | Workbook A is open | Macro to open Workbook B (this takes a second to load therefore cancelling | the rest of the macro) | Copy selected text from B | Close Workbook B | Paste info on Workbook A | | Your help appreciated. | -- | David P. -- Dave Peterson |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro not finishing due to loading workbook
What Dave said holds even if the workbook you're opening doesn't have any
macros. It kills the calling macro too. -- Jim "David P." wrote in message ... | Yes, by keyboard shortcut. | -- | David P. | | | "Jim Rech" wrote: | | Macro to open Workbook B | | How do you execute this macro? Keyboard shortcut? | | -- | Jim | "David P." wrote in message | ... | |I have a macro that opens another workbook but it appears that the macro | | fails to finish because it's almost like it's not waiting for it to load. | | Essentially this is what I'm doing: | | | | Workbook A is open | | Macro to open Workbook B (this takes a second to load therefore cancelling | | the rest of the macro) | | Copy selected text from B | | Close Workbook B | | Paste info on Workbook A | | | | Your help appreciated. | | -- | | David P. | | |
#8
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro not finishing due to loading workbook
That's the problem. Thank you Dave & both Jims.
-- David P. "Dave Peterson" wrote: Remove the shift key from the shortcut combination. Holding down the shiftkey while you're opening a file tells excel not to run the workbook_open event or the auto_open procedure. And it confuses excel so that it never goes back to finish your code. David P. wrote: Yes, by keyboard shortcut. -- David P. "Jim Rech" wrote: Macro to open Workbook B How do you execute this macro? Keyboard shortcut? -- Jim "David P." wrote in message ... |I have a macro that opens another workbook but it appears that the macro | fails to finish because it's almost like it's not waiting for it to load. | Essentially this is what I'm doing: | | Workbook A is open | Macro to open Workbook B (this takes a second to load therefore cancelling | the rest of the macro) | Copy selected text from B | Close Workbook B | Paste info on Workbook A | | Your help appreciated. | -- | David P. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Shared Workbook not loading | Excel Discussion (Misc queries) | |||
personal macro workbook just stopped loading | Excel Discussion (Misc queries) | |||
How to stop Excel remembering/loading macro from previously opened Workbook | Excel Discussion (Misc queries) | |||
Image not loading when opening Workbook | Excel Discussion (Misc queries) | |||
Disable VBA code execution when loading a workbook | Excel Discussion (Misc queries) |