Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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, |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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, |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Jul 1, 3:55*pm, "Nigel" wrote:
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,- Hide quoted text - - Show quoted text - Directory is there, file is there, It even opens up when I execute the macro but after opening the file, it returns the same error. Even if I use your code it creates an error. When I click debug to see where the error occured, it is the same line. Is this because of the excel file that I am trying to open ? I am only doing this because I have a seperate macro that need to be done in :="G:\ReportFiles\ReportTemplate.xls" Is there anyway I can run the macro from other workbook in the current workbook? if I do "Application.Run "ReportTemplate.xls'!Macro_B" will it work? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Did you create any subroutines/functions called Open?
Did you name any of your modules Open? James8309 wrote: 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, -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Jul 1, 9:53*pm, Dave Peterson wrote:
Did you create any subroutines/functions called Open? Did you name any of your modules Open? James8309 wrote: 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, -- Dave Peterson Nope :( |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry, I don't have another guess.
Does the code work in a brand new workbook's project? I bet it does, so there's something bad going on in that original workbook. James8309 wrote: On Jul 1, 9:53 pm, Dave Peterson wrote: Did you create any subroutines/functions called Open? Did you name any of your modules Open? James8309 wrote: 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, -- Dave Peterson Nope :( -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
can't create a simple Line Chart | New Users to Excel | |||
simple bar and line chart | Charts and Charting in Excel | |||
Simple line fix request. | Excel Programming | |||
Simple Question (insert new line) | Excel Programming | |||
Missing a line (Simple) | Excel Programming |