Runtime error 91 help

Pookiemeister

Well-known Member
Joined
Jan 6, 2012
Messages
563
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
I either might be really tired or I am overthinking this. That being said, I have 10 Radio buttons on a userform, when the user hovers over any of them, a control tip will be displayed for each radio button selection. I only entered one option(radio) button to test the code. The route I took for this task was probably the wrong one. I really didn't want ten IF-Then states. So I chose to use the select case but I am getting Runtime error '91':
Object variable or With block variable not set.
Code:
Private Sub UserForm_Initialize()    
    Dim selection As Control
    
    Select Case selection
        Case optSlat.MouseMove = True
            optSlat.ControlTipText = "Candy Line"
    End Select
End Sub

Thank You
 
Last edited:

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Where are you setting selection?
 
Upvote 0
You can set a controls ContolTipText in the Properties Window at design time, no code is needed.
 
Upvote 0

Forum statistics

Threads
1,215,506
Messages
6,125,197
Members
449,214
Latest member
mr_ordinaryboy

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