Is there a VBA error message that allows code to continue executing?

RockandGrohl

Well-known Member
Joined
Aug 1, 2018
Messages
819
Office Version
  1. 365
Platform
  1. Windows
I'm creating an automated sheet for a rather rude colleague and as a bit of fun I've made it so if she types an incorrect value in a table, the table then flashes red and blue like police lights, I want to have a pop-up box that informs her the value is incorrect but the issue is this interrupts the police lights... Can I get the police lights to flash indefinitely until she presses "OK" on the pop-up? Thanks

ActiveSheet.ListObjects("Table1").TableStyle = "TableStyleDark2"
Application.Wait (Now + TimeValue("00:00:01"))
ActiveSheet.ListObjects("Table1").TableStyle = "TableStyleDark3"
Application.Wait (Now + TimeValue("00:00:01"))
ActiveSheet.ListObjects("Table1").TableStyle = "TableStyleDark2"
Application.Wait (Now + TimeValue("00:00:01"))
ActiveSheet.ListObjects("Table1").TableStyle = "TableStyleDark3"
Application.Wait (Now + TimeValue("00:00:01"))
ActiveSheet.ListObjects("Table1").TableStyle = "TableStyleDark2"
Application.Wait (Now + TimeValue("00:00:01"))
ActiveSheet.ListObjects("Table1").TableStyle = "TableStyleDark3"
Application.Wait (Now + TimeValue("00:00:01"))
ActiveSheet.ListObjects("Table1").TableStyle = "TableStyleDark2"
Application.Wait (Now + TimeValue("00:00:01"))
ActiveSheet.ListObjects("Table1").TableStyle = "TableStyleDark3"
Application.Wait (Now + TimeValue("00:00:01"))
ActiveSheet.ListObjects("Table1").TableStyle = "TableStyleDark2"
Application.Wait (Now + TimeValue("00:00:01"))
ActiveSheet.ListObjects("Table1").TableStyle = "TableStyleDark3"
Application.Wait (Now + TimeValue("00:00:01"))
ActiveSheet.ListObjects("Table1").TableStyle = "TableStyleDark2"
Application.Wait (Now + TimeValue("00:00:01"))
ActiveSheet.ListObjects("Table1").TableStyle = "TableStyleDark3"
Application.Wait (Now + TimeValue("00:00:01"))
ActiveSheet.ListObjects("Table1").TableStyle = "TableStyleDark2"
Application.Wait (Now + TimeValue("00:00:01"))
ActiveSheet.ListObjects("Table1").TableStyle = "TableStyleDark3"
Application.Wait (Now + TimeValue("00:00:01"))


Also, is there any way to get these to be faster than a second between flashes? 0.5 seconds would be ideal :)
 
Msgbox wont' allow it, I think that you if you tie the code to an Userform, (with modal set as false), you will need however to run a validation macro on the background at all time to trigger this event.
 
Upvote 0

Forum statistics

Threads
1,226,842
Messages
6,193,292
Members
453,788
Latest member
drcharle

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top