DropDown/ComboBox property Problem

chrislenway

New Member
Joined
Apr 16, 2009
Messages
44
I am perplexed!

I put together a program that when an item in the dropdown menu is selected, it will copy and paste information from specific cells to the indicated page. (Please see code) I am trying to re-create the same code using a new workbook, copying and pasting verbatim what is in the old workbook, and I get "Run-time error '1004': Unable to get the DropDowns property of the worksheet class".

Is something over my head happening here? Please help!

The code in the sheet I am using is as follows:

Private Sub ComboBox21_change()

Dim LastRow As Long
Dim DataRange As Range
Select Case ComboBox21

'Range("B5:I5").Select is your variable to make more comboboxes

Case "Bridge"
Range("B5:I5").Select
Selection.Copy
Sheets("Bridge").Select
Set DataRange = Range(Cells(2, 5))
LastRow = Cells.Find(What:="*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows).Row
LastRow = LastRow + 1
ActiveSheet.Paste

Case "Consultant"
Range("B5:I5").Select
Selection.Copy
Sheets("Consultant").Select
Set DataRange = Range(Cells(2, 5))
LastRow = Cells.Find(What:="*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows).Row
LastRow = LastRow + 1
ActiveSheet.Paste

End Select

Sheets("ActionItem").Activate

End Sub



There is also a module that controls a macro for the DropDown:

Sub DropDown_Click()

Dim cb As DropDown

Set cb = ActiveSheet.DropDowns(Application.Caller) 'drop down that called the sub

Rows(cb.TopLeftCell.Row).Range("B7:I7").Copy
Sheets(cb.List(cb.ListIndex)).Range("A" & Rows.Count).End(xlUp).Offset(1).PasteSpecial xlPasteValues
Application.CutCopyMode = False

End Sub



Can anyone tell me why it works in one spreadsheet, but not the new one? Did I miss something?


Thanks!


Chris
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Forum statistics

Threads
1,196,483
Messages
6,015,460
Members
441,897
Latest member
erma

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