Change format of combobox using vba

IM4FLSt

New Member
Joined
Mar 28, 2011
Messages
17
Hi everyone,

I am curently writing an excel spreadsheet with a couple drop down boxes, the form control combobox, not an activex control.

I have a macro in vba that should change the list reference of the combobox, but I get 'run-time error 32809 Application-defined or object-defined error'. The error occurs on the first line of the following two codes.

Here are the two different codes I have tried:

ActiveSheet.Shapes("Drop Down 2").ControlFormat.ListFillRange = Range("L1") <== Error occurs here

and

ActiveSheet.Shapes("Drop Down 2").Select <== Error occurs here
With Selection
.ListFillRange = Range("L1")
End With

The error does not occur on excel 2010, but it does occur on my excel 2003. I have tried recording a macro while performing the change manually and I get the second macro above. After recording the macro, I try running it and it comes up with the same error.

Anyone have ideas?

Thanks for your help
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
I believe I have found the answer. I created the spreadsheet using the new .xlsm file format and excel 2003 had issues with it. If I save it using excel 2010 as .xls, I have no issues.
 
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