Code: Select all
--Macro to check the contents of cell A5 of the activesheet and display message
Sub Check
sheet = ThisComponent.CurrentController.ActiveSheet
value = Contents of cell A5
If Value = "0" then Msg "All Good" Else Msgbox "Check Cell A5" EndIf
End Sub
Edit: Changed subject, was If condition Make your post understandable by others -- MrProgrammer, forum moderator |