PC Review


Reply
Thread Tools Rate Thread

closing file

 
 
Novice Lee
Guest
Posts: n/a
 
      12th May 2010
Hello,

I have a module that sorts data for me. part of the code opens a source file
then saves it to another directory with todays date and adds a number to it
it there is another file with that same name.
my question is how can i close the save as file,

Thanks
 
Reply With Quote
 
 
 
 
FSt1
Guest
Posts: n/a
 
      12th May 2010
hi
the saved file should be the active file so add a line of code to the macro.
ActiveWorkbook.Close

this assumes no changes were made to the saved file. if changes were made,
then it needs to be saved again.
ActiveWorkbook.Close True

regards
FSt1

regards
FSt1

"Novice Lee" wrote:

> Hello,
>
> I have a module that sorts data for me. part of the code opens a source file
> then saves it to another directory with todays date and adds a number to it
> it there is another file with that same name.
> my question is how can i close the save as file,
>
> Thanks

 
Reply With Quote
 
Novice Lee
Guest
Posts: n/a
 
      12th May 2010
Thanks that was it

"FSt1" wrote:

> hi
> the saved file should be the active file so add a line of code to the macro.
> ActiveWorkbook.Close
>
> this assumes no changes were made to the saved file. if changes were made,
> then it needs to be saved again.
> ActiveWorkbook.Close True
>
> regards
> FSt1
>
> regards
> FSt1
>
> "Novice Lee" wrote:
>
> > Hello,
> >
> > I have a module that sorts data for me. part of the code opens a source file
> > then saves it to another directory with todays date and adds a number to it
> > it there is another file with that same name.
> > my question is how can i close the save as file,
> >
> > Thanks

 
Reply With Quote
 
JLGWhiz
Guest
Posts: n/a
 
      12th May 2010
ActiveWorkbook.Close



"Novice Lee" <(E-Mail Removed)> wrote in message
news:4CB4D4DB-43B0-438D-81A3-(E-Mail Removed)...
> Hello,
>
> I have a module that sorts data for me. part of the code opens a source
> file
> then saves it to another directory with todays date and adds a number to
> it
> it there is another file with that same name.
> my question is how can i close the save as file,
>
> Thanks



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to skip the save file notoification on file closing? =?Utf-8?B?RGFu?= Microsoft Excel Worksheet Functions 1 19th Aug 2007 02:26 PM
file access error on SQLCE database file after closing connection Dexlex Microsoft Dot NET Compact Framework 1 21st Jul 2006 06:15 AM
Closing a PST file Mark Rae Microsoft Outlook VBA Programming 1 6th May 2006 08:48 AM
Closing an Excel file generates a .txt file Jesse Microsoft Excel Misc 1 19th Sep 2003 12:15 AM
Closing an excel file causes a .txt file to be generated Jesse Yost Microsoft Excel Misc 0 18th Sep 2003 05:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:44 AM.