johnkiddier
Technical User
Sorry to bother everyone here, but I'm starting to learn VBA and having some difficulty running the following routine in Excel:
Private Sub Worksheet_Calculate()
If Range("a25".Value <>0 Then
MsgBox ("Imbalance"
End If
End Sub
I'm placing the macro in the Worksheet Class Module but it won't run on calculation of the sheet.
If I follow the book I'm reading and insert the following code it does run.
Private Sub Worksheet_Calculate()
Columns("A:F".AutoFit
End Sub
Any ideas anyone?
I'm no doubt doing something really stupid but any help is much appreciated.
Many thanks
John Kiddier
Private Sub Worksheet_Calculate()
If Range("a25".Value <>0 Then
MsgBox ("Imbalance"
End If
End Sub
I'm placing the macro in the Worksheet Class Module but it won't run on calculation of the sheet.
If I follow the book I'm reading and insert the following code it does run.
Private Sub Worksheet_Calculate()
Columns("A:F".AutoFit
End Sub
Any ideas anyone?
I'm no doubt doing something really stupid but any help is much appreciated.
Many thanks
John Kiddier