View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nigel[_2_] Nigel[_2_] is offline
external usenet poster
 
Posts: 735
Default Simple line error msg

If the path and file exists then the code line is correct. Are you
assigning this to a object? If so use

Set wbkNew = Workbooks.Open ("G:\ReportFiles\ReportTemplate.xls")

--

Regards,
Nigel




"James8309" wrote in message
...
Hi everyone,

one of my line in my VBA code is ;

Workbooks.Open Filename:="G:\ReportFiles\ReportTemplate.xls"


and I do not understand why this line creates "Invalid Procedure call
or argument"

Please help

thank you,