Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
troubles with ActiveWorkbook.Save
HI!
i'm having troubles with activeworkbook.save I have a button that calls "closewb"macro If I use this button,the file is closed WITHOUT saving anything If I close by rightclick-close,or with the x in the topright corner, i saves.Why? I will be happy If anyone helps :) Sub closewb() ActiveWorkbook.Close End Sub Private Sub Workbook_BeforeClose(Cancel As Boolean) Worksheets(1).Select If Range("c2").Value = "EFFETTIVO" Or Range("f50").Value = "annulla Then ActiveWorkbook.Saved = True Else: ActiveWorkbook.Save End If End Su -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
troubles with ActiveWorkbook.Save
Here I am...
I missed ":" while writing savechanges : = true Now everything goes well... It's strange ,bytheway....I didn't receive any kind of error... thought that the beforeclose sub was less flexible...mmh,don't kno what to think! Bye -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ActiveWorkbook.RefreshAll | Excel Discussion (Misc queries) | |||
ActiveWorkBook | Excel Discussion (Misc queries) | |||
ActiveWorkbook.ProtectSharing | Excel Programming | |||
ActiveWorkbook.RefreshAll | Excel Programming | |||
internet explorer (ie) issue with activeworkbook.saved (save prompt) AAARGH. | Excel Programming |