LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 98
Default Run time error 9 (Subscript Out Of Range)

Hi,

I am getting a error.

Run time error 9 on this line of code ( Windows(hirename).Activate ) I
am not able to understand it i also tried alternative code
wookbooks("Hrining Plan.xls").Activate but it is also not working.

Sub RamPlan()

Workbooks("Ramp Plan Macro.xls").Activate
Sheets("Macro").Select

Dim hirePath As String
Dim ramppath As String
Dim hirename As String
Dim rampName As String

hirePath = Range("c8").Value
ramppath = Range("c9").Value
hirename = Range("c10").Value
rampName = Range("c11").Value


Workbooks.Open ramppath & "\" & rampName
Workbooks.Open hirePath & "\" & hirename

Workbooks("Ramp Plan Macro.xls").Activate
Sheets("Macro").Select

Dim fromdate As Variant
fromdate = Range("c13").Value

Windows(hirename).Activate
Sheets("C LLC").Select
Range("A2").Select

Do Until Selection.Value = fromdate
Selection.Offset(1, 0).Select
Loop
Selection.Offset(0, 5).Select

End Sub
 
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
run time error #9, subscript out of range Janis Excel Programming 4 August 17th 07 03:46 PM
run time error 9, subscript out of range [email protected] Excel Programming 6 July 7th 06 02:35 AM
Run time error 9 : Subscript out of range JAtz_DA_WAY Excel Discussion (Misc queries) 6 August 29th 05 08:26 PM
Run time error '9' Subscript out of range Tina Excel Programming 1 August 25th 03 02:05 AM
Run time error 9 (subscript out of range) Nathaniel Tigere Excel Programming 2 August 5th 03 11:12 AM


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