Make arrow flash

lecet444

Board Regular
Joined
May 18, 2011
Messages
91
Hello, I'm trying to get an arrow to flash once a button is pressed if the textbox wasnt filled out correct. A message asking the person to fillout PO number and arrow would flash to identify where it should be entered.

thats what I have so far, but it's not working I get "object doesnt support this property or method"

Thank You,


Code:
If ActiveSheet.Shapes.Range(Array("TextBox1")).Value = Not numeric or ActiveSheet.Shapes.Range(Array("TextBox1")).Value = 0 Then
Dim Correct As String
Dim MESSAGE As String
MESSAGE = "Please enter PO NUMBER"
Correct = MsgBox(MESSAGE, vbQuestion + vbOKCancel, "Fillout Properly")
End If
If Correct = vbOK Then
ActiveSheet.Shapes.Range(Array("Left Arrow 2")).Visible = True
Dim myTime As Date
'Current time +5 sec /60 secs/60 mins/24 hrs
myTime = Time + 1 / 86400
'Wait for 5 secs
While Time < myTime
    DoEvents
Wend
ActiveSheet.Shapes.Range(Array("Left Arrow 2")).Visible = False
'Else
'Exit Sub
End If
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Why never any answers.
There are a lot of talents people here, I thought this forum is to help out not ignore
 
Upvote 0
Try this couldn't help playing

Time is difficult in VBA

so used a for next counter

Code:
Sub doobee()
 
Dim Correct As Variant
Dim VV As Double
Dim MESSAGE As String
 
MESSAGE = "Please enter PO NUMBER"
 
Application.Worksheets("Sheet1").Activate
 
'Range("K1").Value = "boo"
 
ActiveSheet.Shapes.Range(Array("Left Arrow 1")).Fill.Transparency = 0.01
 
If Not IsNumeric(ActiveSheet.TextBox1.Value) Or ActiveSheet.TextBox1.Value = 0 Then
    Correct = MsgBox(MESSAGE, vbQuestion + vbOKCancel, "Fillout Properly")
End If
 
If Correct = vbOK Then
    VV = 100
    ActiveSheet.Shapes.Range(Array("Left Arrow 1")).Fill.Transparency = 1
 
    DoEvents
 
    For X = 1 To 25000
        DoEvents
        If X Mod 1000 = 0 Then
            VV = VV - 4
            ActiveSheet.Shapes.Range(Array("Left Arrow 1")).Fill.Transparency = (VV / 100)
        End If
    Next X
 
    'Wait for 5 secs
    For X = 1 To 25000
        DoEvents
        If X Mod 1000 = 0 Then
            VV = VV + 4
            ActiveSheet.Shapes.Range(Array("Left Arrow 1")).Fill.Transparency = (VV / 100)
        End If
    Next X
    'VV = 100
 
    'ActiveSheet.Shapes.Range(Array("Left Arrow 1")).Fill.Transparency = 1
    'Else
    'ActiveSheet.
 
End If
 
End Sub

vv is lazy but is a counter

This pulses the arrow in and out

"Correct" has been changed to Variant to better handle result
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,514
Messages
6,179,223
Members
452,896
Latest member
IGT

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