View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
PBcorn PBcorn is offline
external usenet poster
 
Posts: 79
Default error 9 - simple code

to open a workbook if it is not already open:

dim path as string

path = " letter:\...\\workbook.xls"

If Workbooks(path).IsOpen = False Then
workbooks.open filename:=path

Gives subscript out of range. The solutions i found by searching the forum
are a bit long-winded - why doesn't the above work?