Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Subscript out of range

I have an application consisting of two open workbooks. The first workbook
opens, then opens the second workbook. The second workbook contains very
little VBA code, just the following:

Private Sub Workbook_Open()

ThisWorkbook.RefreshAll

End Sub

When the End Sub is reached I get the error message Run-time error 9 -
Subscript out of range.

The purpose of the second workbook is to import a table from a mainframe,
which is then used by the first workbook using Vlookup. I would like to
have the application automatically reactivate the first workbook once the
second workbook has finished it's import and refreshed.

Any ideas are welcome.

Bill


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Subscript out of range

I have an application consisting of two open workbooks. The first
workbook
opens, then opens the second workbook. The second workbook contains very
little VBA code, just the following:


Doesn't take much to cause VBA to throw an error!

Private Sub Workbook_Open()

ThisWorkbook.RefreshAll

End Sub

When the End Sub is reached I get the error message Run-time error 9 -
Subscript out of range.


Do you mean this end sub or some other part of the code?

The purpose of the second workbook is to import a table from a mainframe,
which is then used by the first workbook using Vlookup. I would like to
have the application automatically reactivate the first workbook once the
second workbook has finished it's import and refreshed.


When are you doing this, is this before the error or after?

Any ideas


Suggest you submit the code for closer inspection

Cheers
Nigel


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
Subscript out of Range Steve Excel Discussion (Misc queries) 3 April 15th 09 04:01 PM
9: Subscript out of range jenz21985 Excel Discussion (Misc queries) 6 May 5th 06 03:36 PM
subscript out of range Todd Huttenstine[_3_] Excel Programming 1 June 11th 04 04:08 AM
Subscript out of range? Jason Hancock Excel Programming 3 May 26th 04 07:11 PM
Subscript out of range Ed Excel Programming 1 February 5th 04 07:17 PM


All times are GMT +1. The time now is 11:31 PM.

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"