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

I get an error message of "Error 9 Subscript out of
range" whenever I run through the following code:

Private Sub ImportData()
'On Error Resume Next
Dim MasterSheet As String, Cell As Range
If UCase(InputBox("Please enter coordinator password to
continue...", "Fox and Jacobs Homes")) < "BUGSY1" Then
Exit Sub
MasterSheet = "MasterValidData"
Application.ScreenUpdating = False
Sheets("MasterValidData").Visible = True
Sheets("MasterValidData").Select
Cells.Delete
Cells.Delete Shift:=xlUp
Cells.Delete Shift:=xlUp

Workbooks.Open Filename:=Vendors
ActiveSheet.Range("A1").CurrentRegion.Copy
Workbooks("VPOUpdateFile").Sheets(MasterSheet).Ran ge
("B1").Paste

I'm not too sure what the issue is. Help is greatly
appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default Subscript out of range error

Chris M. wrote:
Workbooks.Open Filename:=Vendors


Try Workbooks.Open Filename:="Vendors"

Alan Beban

I get an error message of "Error 9 Subscript out of
range" whenever I run through the following code:

Private Sub ImportData()
'On Error Resume Next
Dim MasterSheet As String, Cell As Range
If UCase(InputBox("Please enter coordinator password to
continue...", "Fox and Jacobs Homes")) < "BUGSY1" Then
Exit Sub
MasterSheet = "MasterValidData"
Application.ScreenUpdating = False
Sheets("MasterValidData").Visible = True
Sheets("MasterValidData").Select
Cells.Delete
Cells.Delete Shift:=xlUp
Cells.Delete Shift:=xlUp

Workbooks.Open Filename:=Vendors
ActiveSheet.Range("A1").CurrentRegion.Copy
Workbooks("VPOUpdateFile").Sheets(MasterSheet).Ran ge
("B1").Paste

I'm not too sure what the issue is. Help is greatly
appreciated.


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
Error:Subscript out of range Jay Excel Discussion (Misc queries) 1 April 10th 08 10:25 PM
subscript out of range error in excell Lilivati Excel Discussion (Misc queries) 4 June 26th 06 07:15 PM
Subscript out of range error moglione1 Excel Discussion (Misc queries) 2 August 30th 05 01:21 PM
Run time error '9' Subscript out of range Tina Excel Programming 1 August 25th 03 02:05 AM
Subscript out of range error Gary[_4_] Excel Programming 1 August 13th 03 07:20 AM


All times are GMT +1. The time now is 12:25 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"