View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Lilivati
 
Posts: n/a
Default subscript out of range error in excell

The problem seems not to be in the if loop but in the
Application.GetOpenFilename procedure. It is simply not acknowledging
that this is defining nassisfile! It had no problems with this on
Friday, this is driving me nuts!


Lilivati wrote:
Alright, ignore that previous message...I made a silly mistake with the
naming and the simplified version

Public Sub Workbook_Open()
modelfile = ThisWorkbook.Name
nassisfile = "masterlist.xls"
End Sub

works. However when I try to define nassisfile in the if loop I have
in the first post the worksheet change script is unable to find the
nassisfile variable.