Please help with the vba code to find the number in the area (L8:P17) that matches 1 of the 4 numbers in the area (F1:I1) and automatically flash through the 4 corresponding buttons, thank you.
Please help with the vba code to find the number in the area (L8:P17) that matches 1 of the 4 numbers in the area (F1:I1) and automatically flash through the 4 corresponding buttons, thank you.
Thank you very much, can you help me add VBA code to delete the found numbers?
Hello HGVIET,
Your code is close - just needs a tweak.
In your code you specify where to run the code ( "L10" ). Rather than specify where to look, you want code to find the value in "F1" in the range "L8:P17" and then run your code on that cell. A simple version of this is:
Select AllSub Find_F1_Number() Dim i As Long Dim where As String Const t = 1 ' 1s Const freq = 5 where = Range("L8:P17").Find(Range("F1").Value).Address With Range(where) Do i = i + 1 Application.Wait Now + TimeSerial(0, 0, t) .NumberFormat = ";;;" ' set o A1 to invisible Application.Wait Now + TimeSerial(0, 0, t) .NumberFormat = "General" ' set o A1 to visible If i >= freq And .NumberFormat = "General" Then Exit Sub Loop End With End Sub '
I then copied this code 3 times and changed "F1" to "G1", "H1", and "I1"
In the attached file I have assigned these macros to your buttons "A", "B", "C", & "D".
Hope this helps, if so please remember to mark my answer as Selected.
Cheers :-)