View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sashi Sashi is offline
external usenet poster
 
Posts: 7
Default Workbook_BeforeClose Question

I'm using this code to clear everything within the range of C14 to C21
(Sheet1) before my workbook closes:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Worksheets("Sheet1").Range("C14:C21").ClearContent s
End Sub

I wonder why it doesn't work. The data still remain (in the cells) if I
open it again. Is it because some cells have data validation on it? And
they're data input is restricted?

Or is there another way of making this work?

Help. :)