Anonymous321
New Member
- Joined
- Oct 12, 2021
- Messages
- 32
- Office Version
- 365
- Platform
- Windows
Hi
I'm wondering if there is a way to add your own error message to a macro I have assigned to a button.
The button merely just removes any filters present in the sheet. If the button is pressed without any filters being present it comes up with abit of a messy error message. I'm wondering if theres a way to change this error message so it reads whatever I want it too.
The code in question:
Sub Remove_Filters()
'
' Remove_Filters Macro
'
'
ActiveSheet.ShowAllData
End Sub
I'm wondering if there is a way to add your own error message to a macro I have assigned to a button.
The button merely just removes any filters present in the sheet. If the button is pressed without any filters being present it comes up with abit of a messy error message. I'm wondering if theres a way to change this error message so it reads whatever I want it too.
The code in question:
Sub Remove_Filters()
'
' Remove_Filters Macro
'
'
ActiveSheet.ShowAllData
End Sub