Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default Close macro file

Hi,

I have built a macro in which it has done it thing. Now, it is complete,
can I close the file that contains the macro too? Is that possible?

MrRJ
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Close macro file

try

application.quit

"MrRJ" wrote:

Hi,

I have built a macro in which it has done it thing. Now, it is complete,
can I close the file that contains the macro too? Is that possible?

MrRJ

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Close macro file

ActiveWorkbook.Close
' closes the active workbook and lets the user decide if
' changes are to be saved or not

On Feb 13, 2:26*pm, MrRJ wrote:
Hi,

I have built a macro in which it has done it thing. *Now, it is complete,
can I close the file that contains the macro too? *Is that possible?

MrRJ


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Close macro file

Jim: the problem is the saveas closes the oringal workbook and only nleaves
the saveas file opened. if yo want to go back to the original file you have
to re-open the workbook.

"Jim" wrote:

ActiveWorkbook.Close
' closes the active workbook and lets the user decide if
' changes are to be saved or not

On Feb 13, 2:26 pm, MrRJ wrote:
Hi,

I have built a macro in which it has done it thing. Now, it is complete,
can I close the file that contains the macro too? Is that possible?

MrRJ



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default Close macro file

Thanks guys. I didn't want to close the whole application, just in case the
user has other files open. So, I created a simple line with the specific
file name that the macro is being used.

I am all good.


"Joel" wrote:

Jim: the problem is the saveas closes the oringal workbook and only nleaves
the saveas file opened. if yo want to go back to the original file you have
to re-open the workbook.

"Jim" wrote:

ActiveWorkbook.Close
' closes the active workbook and lets the user decide if
' changes are to be saved or not

On Feb 13, 2:26 pm, MrRJ wrote:
Hi,

I have built a macro in which it has done it thing. Now, it is complete,
can I close the file that contains the macro too? Is that possible?

MrRJ



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
close file macro Tizy Excel Programming 2 July 23rd 05 12:34 AM
Close file and run macro from newly opened file Pradip Jain Excel Programming 1 April 23rd 05 11:39 PM
use a macro to close a file wtpcomplab Excel Programming 0 November 23rd 04 06:45 PM
close file macro Will Fleenor Excel Programming 3 October 21st 04 05:49 PM
Automate open file, update links, run macro, close and save file Geoff[_7_] Excel Programming 2 August 26th 03 10:13 PM


All times are GMT +1. The time now is 10:21 PM.

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"