Robert Mika
MrExcel MVP
- Joined
- Jun 29, 2009
- Messages
- 7,256
I have go this simple macro:
When opening workbook am getting error message and the VBA debug is poiting to this macro.
This macro is called by other macros
Like this one:
Anyone can have idea what can couse the macro to trigger itself?
Code:
Sub Unhideall()
Range("a12:a250").Select
Selection.EntireRow.Hidden = False
Range("a1").Select
End Sub
This macro is called by other macros
Like this one:
Code:
Private Sub ListBox2_Click()
Application.ScreenUpdating = False
Dim cell As Range
Dim StartDate As Date
Dim EndDate As Date
If Range("F1").Value = "All" Then
Call Unhideall
Else
For Each cell In Range("g12:g250")
cell.EntireRow.Hidden = True
If cell.Value >= Range("G1") And cell.Value <= Range("H1") Then
cell.EntireRow.Hidden = False
End If
Next
End If
End Sub