I have a macro called "comments" whhich generates a comment
I have tried to set to a workbook open event to run this macro . When I open the workbook, I get a run time error "Invalid Use of Property"
It would be appreciated if someone could amend my code or advise what I need to do
I have tried to set to a workbook open event to run this macro . When I open the workbook, I get a run time error "Invalid Use of Property"
It would be appreciated if someone could amend my code or advise what I need to do
Code:
Private Sub Workbook_Open()
Comments
With Sheets("FA depreciation")
If .Range("D19") <> 0 Then
MsgBox "Depreciation processed"
Else
MsgBox "Depreciation still needs to be processed"
End If
End With
With Sheets("Fixed assets Recon")
If .Range("H11") <> 0 Or .Range("H24") > 0 Then
MsgBox "There is a variance"
End If
End With
With Sheets("Fixed assets Recon")
If .Range("i30") <> 0 Then
MsgBox "There is a variance on the Income Staement-Please correct"
End If
End With
End Sub