Hello, new to VBA. I have created a Record Macro to delete some formatting on my spreadsheet. It works fine with the button. I have had users use the clear button by accident...
I want to have a message box appear with "are you sure you want to clear" MsgBox "Ok to clear the schedule?", vbYesNo
But when I do this...
Only one works? It will still clear it...but the message will not appear. I have done seperatly and both work. so I added this to have both appear.
Sub Button1_Click()
Call Sub MsgBoxYesNo()
MsgBox "Are you sure you want to clear the sheet?", vbYesNo
End Sub'Macro1
Call 'Sub Test()
'
' Test Macro
'
'
Range("B22:M34").Select
Selection.Copy
ActiveWindow.SmallScroll Down:=-6
Range("B4").Select
ActiveSheet.Paste
End Sub
Can someone guide me to what i need to change or provide the correct code?
I want to have a message box appear with "are you sure you want to clear" MsgBox "Ok to clear the schedule?", vbYesNo
But when I do this...
Only one works? It will still clear it...but the message will not appear. I have done seperatly and both work. so I added this to have both appear.
Sub Button1_Click()
Call Sub MsgBoxYesNo()
MsgBox "Are you sure you want to clear the sheet?", vbYesNo
End Sub'Macro1
Call 'Sub Test()
'
' Test Macro
'
'
Range("B22:M34").Select
Selection.Copy
ActiveWindow.SmallScroll Down:=-6
Range("B4").Select
ActiveSheet.Paste
End Sub
Can someone guide me to what i need to change or provide the correct code?