View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
mai[_2_] mai[_2_] is offline
external usenet poster
 
Posts: 1
Default Assigning Macro Problem

Hi, I'm trying to assign my macro to an action or event (I think I'
using the correct jargon).

When my user goes in to delete a worksheet, I want to call m
'DeleteSheet' subroutine.

So I would have something like:

Private Sub Workbook_Activate()

If ActiveWorkSheet.Delete then Call DeleteSheet
End If

End Sub

Will this macro always run in the background or can I specify it to ru
only when user tries to delete?

Thanks

--
Message posted from http://www.ExcelForum.com