View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
papou[_4_] papou[_4_] is offline
external usenet poster
 
Posts: 110
Default worksheet_save macro help

Hello Sreedhar
This can't work since there is no Worksheet_Save event in Excel.
But you can use either Workbook_BeforeSave or Workbook_BeforeClose events
instead.

HTH
Cordially
Pascal

"yshridhar" a écrit dans le message de
news: ...
Hi everybody
My worksheet contains worksheet_change event based on range name "ID".
What
i want is when i save or close the workbook i want ID = "". I have written
the following code

Private Sub Worksheet_save()
Range("id") = ""
ActiveWorkbook.Save
End Sub

It works only when i run it from VB window.
Any suggestions.
Thanks in advance
With regards
Sreedhar