Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subscript out of range error

Status
Not open for further replies.

Aerowolf

Programmer
Nov 6, 2002
64
Here's my code:

Dim nm As String, nbr As String, due As String, ord As String
nbr = ActiveCell.Offset(0, 1).Range("A1")
due = ActiveCell.Offset(0, 9).Range("A1")
ord = ActiveCell.Offset(0, 13).Range("A1")
nm = "X:\WOVEN PRODUCTION\CRIMP & WEAVE INST & ROUTINGS\" & ActiveCell & ".xls"
Workbooks.Open nm, 3, False
With Workbooks(nm)
Range("R2").Value = nbr
Range("M5").Value = due
Range("H7").Value = ord
End With

I'm getting a subscript out of range error on the With Workbooks(nm) line. Help!

 


Please post in VBA Visual Basic for Applications (Microsoft) Forum707

Skip,

[glasses] [red]Be Advised![/red] A chicken, who would drag a wagon across the road for 2 cents, is…
POULTRY in motion to PULLET for a PALTRY amount! [tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top