Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default 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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default 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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default 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






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default 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}
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
workbook before close mohavv Excel Discussion (Misc queries) 2 November 21st 07 01:27 AM
close only one workbook bobsmom70601 New Users to Excel 1 March 8th 05 09:43 PM
Close a the current workbook and load another specified workbook Adrian[_7_] Excel Programming 4 August 7th 04 05:29 PM
How can I close a workbook using VBA? Trevor[_4_] Excel Programming 2 March 2nd 04 01:12 AM
cannot close workbook chrisneill Excel Programming 3 July 13th 03 11:10 PM


All times are GMT +1. The time now is 01:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"