Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Always prompted to save even when not modified

hi,

I am using Automation with VC++ 6 to create an excel workbook. I then do
some writing to it and save it before closing the workbook.

When i open the excel spreadsheet from windows explorer i can see the
contents fine. The problem i am having is that when i close it, the save as
dialog appears to prompt me if i would like to save any changes i have made,
even though i haven't made any changes.

I would like to be prompted only if changes are made.

I have included some code snippets below. I'd appreciate any help on how to
solve this problem. I have used a lot of code from Knowledge Base Article
179706.

Thanks In Advance.
Macca


// Create a Spreadsheet
COleVariant
covTrue((short)TRUE),
covFalse((short)FALSE),
covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR);


_Application app;
Workbooks books;
_Workbook book;

Worksheets sheets;
_Worksheet sheet;
Range range;
Font font;
Range cols;

// Start Excel and get Application object.

if(!app.CreateDispatch("Excel.Application"))
{
AfxMessageBox("Couldn't start Excel and get Application object.");
return;
}


//Get a new workbook.
books = app.GetWorkbooks();
book = books.Add (covOptional);
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
Prompted to save hetherjw Excel Discussion (Misc queries) 5 October 27th 05 06:22 PM
Why Prompted To Save Again? Izar Arcturus Excel Programming 3 December 17th 03 05:02 PM
Prompted to save changes after macro save - why? Izar Arcturus Excel Programming 2 December 10th 03 09:27 PM
Save as CSV without being prompted Tom Ogilvy Excel Programming 0 July 18th 03 12:05 AM
Save as CSV without being prompted Randall Arnold[_2_] Excel Programming 0 July 17th 03 10:36 PM


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