Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 67
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,718
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 67
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 67
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,718
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 67
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shared Workbook not loading Richard M Burton Excel Discussion (Misc queries) 2 May 22nd 07 08:45 PM
personal macro workbook just stopped loading GoBobbyGo Excel Discussion (Misc queries) 4 August 22nd 06 04:27 PM
How to stop Excel remembering/loading macro from previously opened Workbook Norman Yuan Excel Discussion (Misc queries) 4 June 17th 06 04:13 PM
Image not loading when opening Workbook wadein Excel Discussion (Misc queries) 1 April 12th 06 01:53 PM
Disable VBA code execution when loading a workbook Charles Excel Discussion (Misc queries) 4 October 14th 05 09:12 PM


All times are GMT +1. The time now is 06:52 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"