Userform Control

tianimo

New Member
Joined
Sep 29, 2006
Messages
9
Hi,

does anyone know if Excel VBA Userforms are supposed to contain a "countbox" of some description as a standard (or 'additional') control for Userforms?

I've looked through the Toobox menus, and can't seem to find anything. It's certainly not one of the standard Microsoft Forms 2.0 controls provided with Excel 2003.

Perhaps I'm going crazy, but I swear I've seen it on someone else's version of Excel. It looks a bit like a spinbutton and a textbox displaying a number combined, except it's just one object.

Thanks

tianimo
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Hi,

I can't find it anything on my machine that represents a single control that you seek, it is however very simple to code:

On a form place:

1 scrollbar (Named ScrollBar1)
1 Label (Name Label1)

In the code window for the form place the following:

Code:
Private Sub ScrollBar1_Change()
Label1.Caption = ScrollBar1.Value
End Sub

HTH

Regards

Kevin
 
Upvote 0
Good afternoon tianimo

From the VBE go to Insert > UserForm. On the blank userform draw a textbox and a spinner. Now hold down Ctrl, select them both and drag them onto the Toolbox. Every time you open Excel this additional tool will be available and will set them both up at once if dragged onto the UserForm. Of course you'll have to reference them seperately when coding but that's not that difficult.

HTH

DominicB
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,453
Members
448,967
Latest member
grijken

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