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

I have one workbook that has a macro that imports a .txt or .dat file,
processes it then saves it to a specified location.

At the end of the macro, I tried closing the ActiveWorkbook but that ended
up being the 'new' file I created.

How do I close the 'source' file (the filet that is running the macro)?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Close specific workbook

try Thisworkbook.Close

"Robert_L_Ross" wrote:

I have one workbook that has a macro that imports a .txt or .dat file,
processes it then saves it to a specified location.

At the end of the macro, I tried closing the ActiveWorkbook but that ended
up being the 'new' file I created.

How do I close the 'source' file (the filet that is running the macro)?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Close specific workbook

DOH! Genius!!

Thanks!

"Joel" wrote:

try Thisworkbook.Close

"Robert_L_Ross" wrote:

I have one workbook that has a macro that imports a .txt or .dat file,
processes it then saves it to a specified location.

At the end of the macro, I tried closing the ActiveWorkbook but that ended
up being the 'new' file I created.

How do I close the 'source' file (the filet that is running the macro)?

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
Macro to Close a specific workbook. Dmad11 Excel Discussion (Misc queries) 1 July 7th 09 09:28 PM
Open New Workbook / Save and Close Current Workbook Joe K. Excel Programming 1 December 7th 07 08:04 PM
Close specific workbk Junior728 Excel Programming 1 April 16th 07 10:50 AM
How to close specific workbook not all active workbooks? Bon Excel Programming 1 January 20th 06 02:49 PM
Excel VBA-How to close all open workbooks except one specific? waveracerr[_13_] Excel Programming 3 February 13th 04 06:53 PM


All times are GMT +1. The time now is 04:26 PM.

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

About Us

"It's about Microsoft Excel"