Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Opening an Excel spreadsheet from within an Excel spreadsheet

I am writing a macro in Excel 2003 that opens another Excel spreadsheet using
the following VB statement:

Set RELReport = Workbooks.Open(s_externalLink, 0, ReadOnly:=True)

RELReport is a workbook object, and s_externalLink contains the path and
file name of the spreadsheet to open. The spreadsheet opens OK, but then the
macro hangs and won't go to the next Visual Basic statement. If I put a
breakpoint on or just prior to this statement and step through the code in
the debugger, it works fine, but without using the debugger, it hangs every
time.

Can anyone tell me how to fix this problem? Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Opening an Excel spreadsheet from within an Excel spreadsheet

Just a guess...

How do you invoke the macro? Do you use a shortcut key (like: ctrl-shift-A).

If you do, try dropping the shift from the key combination.

dhputnam wrote:

I am writing a macro in Excel 2003 that opens another Excel spreadsheet using
the following VB statement:

Set RELReport = Workbooks.Open(s_externalLink, 0, ReadOnly:=True)

RELReport is a workbook object, and s_externalLink contains the path and
file name of the spreadsheet to open. The spreadsheet opens OK, but then the
macro hangs and won't go to the next Visual Basic statement. If I put a
breakpoint on or just prior to this statement and step through the code in
the debugger, it works fine, but without using the debugger, it hangs every
time.

Can anyone tell me how to fix this problem? Thanks.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Opening an Excel spreadsheet from within an Excel spreadsheet

Dave,

Thank you very much for your guess! I removed the shortcut key entirely and
the problem went away. I now invoke the macro from a command button.

Don

"Dave Peterson" wrote:

Just a guess...

How do you invoke the macro? Do you use a shortcut key (like: ctrl-shift-A).

If you do, try dropping the shift from the key combination.

dhputnam wrote:

I am writing a macro in Excel 2003 that opens another Excel spreadsheet using
the following VB statement:

Set RELReport = Workbooks.Open(s_externalLink, 0, ReadOnly:=True)

RELReport is a workbook object, and s_externalLink contains the path and
file name of the spreadsheet to open. The spreadsheet opens OK, but then the
macro hangs and won't go to the next Visual Basic statement. If I put a
breakpoint on or just prior to this statement and step through the code in
the debugger, it works fine, but without using the debugger, it hangs every
time.

Can anyone tell me how to fix this problem? Thanks.


--

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
Opening Excel spreadsheet OrcaFire Excel Discussion (Misc queries) 0 March 7th 10 07:26 PM
Opening more than 1 Excel Spreadsheet Catlady Excel Discussion (Misc queries) 4 March 2nd 07 11:49 PM
Opening a spreadsheet in excel labrams Excel Discussion (Misc queries) 5 August 21st 06 03:04 PM
Opening Excel spreadsheet in MAC Doug Excel Discussion (Misc queries) 2 June 26th 05 12:34 AM
Opening an excel spreadsheet Frustrated Excel Worksheet Functions 1 April 2nd 05 06:39 PM


All times are GMT +1. The time now is 02:55 PM.

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

About Us

"It's about Microsoft Excel"