Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run time error 9 (subscript out of range)
I need some assistance with my programm below . I am
getting run time error 9 at the indicated position Public f_name as variant Public Sub Main() f_name = Application _ .GetOpenFilename("Text Files (*.txt), *.txt") If f_name < False Then MsgBox "Open " & f_name End If Workbooks.OpenText Filename:=f_name, Origin:= _ xlWindows, StartRow:=1, DataType:=xlFixedWidth, FieldInfo:=Array(Array(0, _ 2), Array(17, 2), Array(30, 2), Array(39, 2)) .. .. Workbooks.Open Filename:="c:\switch_makros\Switch_Temp.xls" Sheets("Sheet1").Select .. .. .. Call Temp End sub Public Sub Temp() .. .. Windows(f_name).Activate ' I get run time error 9 here .. .. end sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
run-time error '9': subscript out of range | Excel Discussion (Misc queries) | |||
Error:Subscript out of range | Excel Discussion (Misc queries) | |||
Run Time Error 9 (Subscript out of Range) for XLA file | Excel Discussion (Misc queries) | |||
Subscript out of range error | Excel Discussion (Misc queries) | |||
Run time error 9 : Subscript out of range | Excel Discussion (Misc queries) |