Hi there. I have a form in Excel that I want to appear if the user opens up a worksheet in their workbook that is empty. I tried putting the code under the Workbook_Activate. When I F8 through this code it works, but it doesn't work when I'm in my Excel workbook and I click on a sheet to make it active.
Any ideas what I've done wrong? I've commented out my form, and just put a messagebox to appear but that doesn't work either.
Private Sub Workbook_Activate()
Dim result As Long
Application.DisplayAlerts = False
result = Application.WorksheetFunction.CountA(ActiveWorkbook.ActiveSheet.Range("a:iv"))
If result = 0 Then
' Call ShowHeaderForm
Application.DisplayAlerts = True