Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
ActiveWorkbook.RefreshAll nc Excel Discussion (Misc queries) 0 March 21st 06 10:50 AM
ActiveWorkBook Pete Excel Discussion (Misc queries) 3 May 9th 05 04:14 PM
ActiveWorkbook.ProtectSharing Flemming Dahl Excel Programming 0 November 19th 03 07:56 AM
ActiveWorkbook.RefreshAll Mark[_22_] Excel Programming 0 October 15th 03 02:22 AM
internet explorer (ie) issue with activeworkbook.saved (save prompt) AAARGH. Darren Lord Excel Programming 0 September 17th 03 09:27 AM


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