Excel VBA Doesn't Seem to Recognize SelectionBoxSingle()

bonzo

Board Regular
Joined
Oct 23, 2002
Messages
79
When I try to use the SelectionBoxSingle() function in Excel VBA, it abends into the debugger with "Compile error: Sub or Function not defined". Do I need some kind of Excel plugin to have access to this function? What am I missing? I'm using Office 365 on a Windows 10 Enterprise.
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Can you post the code you are using it in ??
 
Upvote 0
I did an Internet search & copied sample code from one of the search results pages. It's very basic at this point. With the "Compile error: Sub or Function not defined" error, there doesn't appear to be any issues like undefined variables or syntax errors.

Dim varArrayList As Variant
Dim strSelected As String
varArrayList = Array("value1", "value2", "value3")
strSelected = SelectionBoxSingle(List:=varArrayList)
If Len(strSelected) > 0 Then
Debug.Print strSelected
End If
 
Upvote 0
Have you set a reference to Microsoft Forms 2.0 Object Library (menu: Tools > References). ??
Have you created the actual SelectionBox object ??
 
Upvote 0
I haven't done either of those things -- because I didn't see anything on the search results page that said any of that was necessary. It just looked like another available pre-defined function. I looked at another search results page that seems to have provided more details, including info about some things to download as well as the reference library. I need to check this out further & see how far I can get. Thanks for the pointers!
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,297
Members
452,903
Latest member
Knuddeluff

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