Drop Down and Scroll Bar -

jroo

Board Regular
Joined
May 22, 2003
Messages
157
Hi,

I purchased a vba book, "MS Excel 2000 Power Programming with VBA" by John Walkenbach. A cd rom comes along with it with spreadsheet examples explained. There's this one workbook in Chapter 3, "Array Examples.xls In tab "Calendar" he has a drop down menu for Months and a scroll bar menu for years. But, I can't figure how he created these. I don't think it was done with VBA programming because when I doubleclicked on these menus, it didn't automatically go to a vba module. Instead, when I double clicked it, a "Format Control" window popped up. The tabs for the window are: Size, Protection, Properties, Web and Control.

When I have the scroll bar selected, the name box (left of the formula bar) displays the name "Scroll Bar 5"; and the formula displays "=TheYear"

(TheYear equals the cell value in cell H16 of the worksheet)

I can select the year by either entering a year in cell H16 - or - by using the scroll bar. The control tab in the "Format Control" window has the following fields: Min value, Max value, Incremental Change, Page Change and Cell Link (= TheYear).

The Drop Down menu (for Months) displays "Drop Down 2" in the named box; and the formula bar has "=TheMonth". The Control tab has the following fields: Input Range = MonthRange (Range("H19:H30"), Cell Link, Drop Down Lines.

Can someone please let to create this...Was this done in VBA? or is there a feature within excel that does this?
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Aloha...

Make a copy of the Calendar sheet and take away the magic.

Select all.
No fill.
Show gridlines.

Add the Drawing toolbar.
Select the Pointer.

Click in the drop down or the scroll bar, and you'll see that you can move them around the form.

They are form controls, which you can find on the toolbar menu (Right click any toolbar. Select Forms.)

He has lists below the calendar which he uses to fill the drop down and the scroll.

Got it?

Tana-Lee
 
Upvote 0
Hi Tana,

I got your email...sorry for not responding sooner. I took a look at it and now I understand how the drop down and scroll bars were created. Thanks so much. Initially i got confused between the toolbar menus..Forms vs. Control Toolbox.

Do you know the difference between these two? It looks like these toolbars offer the sam options... but it looks like the "Control Toolbox" toolbar may involve VBA (i.e. when i double clicked objects from created from this toolbar it brought me to VBA.
 
Upvote 0
Hi jroo:

The controls using the Control ToolBox are ActiveX controls and can have an event oriented macro automatically fire, whereas the controls using the Forms Toolbar need to have a specific macro assigned to the control.
 
Upvote 0

Forum statistics

Threads
1,214,622
Messages
6,120,580
Members
448,972
Latest member
Shantanu2024

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