Home |
Search |
Today's Posts |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA does not open workbook
thanks, Etienne
-----Original Message----- Etienne Most likely, the current path isn't correct. Try something like Workbooks.Open Filename:="C:\full\path\workbook.xls" ' or ChDrive "C:" ChDir "C:\Full\Path" Workbooks.Open Filename:="workbookname.xls" -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Etienne" wrote in message ... Here is the culprit code: Workbooks.Open "workbookname.xls" I tried Workbooks.Open Filename:="workbookname.xls" but it does not work Thanks, Etienne -----Original Message----- What do you mean when you say that VBA doesn't recognize the name of the file? Perhaps you could post the code that is causing the problem. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "etienne" wrote in message ... Any insight as to why a VBA macro would not recognize the name of an existing Excel workbook? Somehow I can make the macro recognize the name by manually using 'save as' with the same name. The macro does save the workbook when it has run successfully by using the command 'ActiveWorkbook.Close SaveChanges:=True' Thanks . . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to: Open closed workbook/Search data tables/Return data to open workbook | Excel Discussion (Misc queries) | |||
Opening Excel, Book1 opens, remains open with other workbook open | Excel Discussion (Misc queries) | |||
how do i open a data workbook when i open a timesheet workbook | Excel Discussion (Misc queries) | |||
excel 2003 saved file will not open without a blank workbook open | Excel Discussion (Misc queries) | |||
Search open sheets in workbook and insert into open sheet | Excel Discussion (Misc queries) |