View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gwill Gwill is offline
external usenet poster
 
Posts: 1
Default need help with simple syntax error

What's wrong with the following???? I get "run-time error '9': Subscript
out of range" on the last line

Sub copyfinaldata()
Dim finalreportfile As String

'Open the FINALREPORT file

finalreportfile = InputBox("Open the final report", "Enter filename",
ThisWorkbook.Path & "\test.xls")
Workbooks.Open Filename:=finalreportfile


Windows(finalreportfile).Activate