Blinking Frame in Userform

maverick93

New Member
Joined
Jan 7, 2010
Messages
23
I am wondering if there is a way to create Userforms1.Frame1.backcolor that alternates between two colors until one of the optionbuttons inside the frame are selected. I have a piece of code that obviously is incorrect but i think that it illustrates what i'm trying to do.
Thanks for the help

VBA Code:
Private Sub UserForm_Activate()
   If OptionButton1.Value = True Or OptionButton2.Value = True Or OptionButton3.Value = True Then
      Frame1.BackColor = &HFFFF&
   Else
      Frame1.BackColor = &HFF&
      'Change to this color after a couple seconds
      Frame1.BackColor = &HFFFF&
       ' Change back to the original color after a couple of seconds
'loop until optionbutton 1,2,or 3 is selected
   End If
end sub
 
Option Explicit must be on one of the first lines of the module. If you still get errors, it means that you use variables that you haven't explicitly declared.
 
Upvote 0

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,215,787
Messages
6,126,905
Members
449,348
Latest member
Rdeane

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