LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Saving a single Worksheet w/o redundant prompts

I am trying to save 1 worksheet out of a workbook that contains 5 worksheets.
I've tried several methods but am not able to make something that I'm
completely happy with.

I'm working in Excel 2003 (and 2000) and I've included the meat of my
current thought process below. The problem I'm having is that when the
application goes to close the activewindow (which is a new workbook that I've
copied the target worksheet into) I get a prompt asking me if I want to save
the changes to the new workbook. Regardless of whethere I click yes or no
the new workbook is where it's supposed to be so I know the code is working
up to the Save command. I don't know why I'm being prompted to save it
again. This code will reside on someone elses machine and I don't want the
redundant Save dialogue box to appear.

Here's the code:

Sheets("WB3 Data").Select
Sheets("WB3 Data").Copy
ActiveWorkbook.SaveAs Filename:= _
"C:\testsave.csv", FileFormat:=xlCSV, CreateBackup:=False
ThisWorkbook.Saved = True
ActiveWindow.Close


Thanks...

 
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
Saving Prompts Colin Hayes Excel Worksheet Functions 2 March 14th 07 03:02 PM
merging single worksheet files into a single workbook DDK Excel Discussion (Misc queries) 1 December 5th 06 05:25 PM
Save a single worksheet in Excel as a single file. Dakota New Users to Excel 4 February 22nd 06 04:46 PM
When saving CSV excel always prompts about the file format SimonW-UK Excel Discussion (Misc queries) 2 November 16th 05 10:34 AM
saving single worksheet E.J. van Wijngaarden Excel Programming 3 April 10th 04 03:34 PM


All times are GMT +1. The time now is 02:32 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"