ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   to close a workbook via VBA (https://www.excelbanter.com/excel-programming/323356-close-workbook-via-vba.html)

J_J[_2_]

to close a workbook via VBA
 
I need to know the code to close a workbook which was opened on XL2003 with
the code line below

Workbooks.Open(strFileName1, Editable:=True).RunAutoMacros
Which:=xlAutoOpen

TIA
J_J




Tushar Mehta

to close a workbook via VBA
 
Hopefully, XL will give you the necessary code with the procedure
below...
Open a workbook. Create a new workbook. Turn on the macro recorder
(Tools | Macro Record new macro...). Switch to the first workbook.
Close it. Turn off the macro recorder. Switch to the VBE.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article , says...
I need to know the code to close a workbook which was opened on XL2003 with
the code line below

Workbooks.Open(strFileName1, Editable:=True).RunAutoMacros
Which:=xlAutoOpen

TIA
J_J





J_J[_2_]

to close a workbook via VBA
 
Thanks Tushar,
Now why didn't I think of that !.
Sincerely
J_J

"Tushar Mehta" wrote in message
...
Hopefully, XL will give you the necessary code with the procedure
below...
Open a workbook. Create a new workbook. Turn on the macro recorder
(Tools | Macro Record new macro...). Switch to the first workbook.
Close it. Turn off the macro recorder. Switch to the VBE.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article , says...
I need to know the code to close a workbook which was opened on XL2003

with
the code line below

Workbooks.Open(strFileName1, Editable:=True).RunAutoMacros
Which:=xlAutoOpen

TIA
J_J







Tushar Mehta

to close a workbook via VBA
 
You are welcome and, hey, we all have those days! :)

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article , says...
Thanks Tushar,
Now why didn't I think of that !.
Sincerely
J_J

{snip}


All times are GMT +1. The time now is 08:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com