don't want to save excel worksheet

techmanbd

Well-known member
Joined
Sep 10, 2003
Messages
398
Location
Burbank, CA
In my code I open an excel sheet, already made up, that inserts info into certain cells then I print it out. No when I close the excel workgroup I get the message ----- If I Want To Save My Changes. generated from the excel program when closing

I remember way back in the day with VB5 that I was able to set something so that it would basically not ask that. I dont want to save what I inserted.

Anybody know the command?
Thanks
 
Well I found my own answer
Had to put:
xlApp.ActiveWorksheet.Saved = TRUE

I am a little confused though, maybe someone can shed some light
this is what I had before
xlApp.ActiveWorksheet.Saved = FALSE
And this would pop up "DO you want to save changes"
I made it true and the pop up doesnt come up, but also doesnt save what i put into the excel sheet.

My mind set is if I set to TRUE it would save. But it doesnt. It just doesnt ask If I want to save.

So any ideas?
 
Display alerts

Setting the DisplayAlerts to false stops all alerts...

excelApp.DisplayAlerts = false;
 
Back
Top