techmanbd Posted October 24, 2003 Posted October 24, 2003 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 don't want to save what I inserted. Anybody know the command? Thanks Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi
techmanbd Posted October 24, 2003 Author Posted October 24, 2003 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 doesn't come up, but also doesn't save what i put into the excel sheet. My mind set is if I set to TRUE it would save. But it doesn't. It just doesn't ask If I want to save. So any ideas? Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi
Administrators PlausiblyDamp Posted October 24, 2003 Administrators Posted October 24, 2003 Saved = TRUE means you are telling the sheet it has been saved and therefore doesn't need to prompt the user. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
techmanbd Posted October 24, 2003 Author Posted October 24, 2003 Ah, ok, so kind of like tricking it thining the program did save. Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi
kkrish Posted November 6, 2003 Posted November 6, 2003 Display alerts Setting the DisplayAlerts to false stops all alerts... excelApp.DisplayAlerts = false; Quote
Recommended Posts