Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with setting the ListFillRange in VBA
Hi, As an experiment, I opened a blank sheet and added a combo box usin the Control Toolbox. I named this combo box cboList. I then add button and this code to it: activesheet.shapes("cboList").controlformat.listfi llrange = "A1:A10" When I ran the code, I got this error: "Object doesn't support this property or method." I looked up a few books on VBA for Excel programming as well as Exce Help but got little help from them. This seems to be a very trivia matter, and I don't know what else to try. I'll appreciate if anybod can explain it to me. Eventually, I would like to be able to read a list of values from th database (using the add-in provided by the database) and assign a nam to this list and then use the name for the listfillrange of my comb box. I don't really need to use a name, but it'll make the rang available in other parts of my application. I built eveyrthing already The last hurdle I needed to get through is setting the listfillrang using code. Thanks for reading, spacecitygu -- spacecitygu ----------------------------------------------------------------------- spacecityguy's Profile: http://www.excelforum.com/member.php...fo&userid=1106 View this thread: http://www.excelforum.com/showthread.php?threadid=31878 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with setting the ListFillRange in VBA
Instead of following Excel help to refer to my listfillrange as below: worksheets(i).shapes(i).controlformat.listfillrang e = "R1C1" which kept giving me the "object not defined" error. I found out this will work: worksheets(i).[name of my list box].listfillrange = "R1C1" Sometimes I just don't understand how the object/class/property work in VBA for Excel. spacecitygu -- spacecitygu ----------------------------------------------------------------------- spacecityguy's Profile: http://www.excelforum.com/member.php...fo&userid=1106 View this thread: http://www.excelforum.com/showthread.php?threadid=31878 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with setting the ListFillRange in VBA
I failed to recognize the difference between ActiveX controls and M Excel Form Controls -- spacecitygu ----------------------------------------------------------------------- spacecityguy's Profile: http://www.excelforum.com/member.php...fo&userid=1106 View this thread: http://www.excelforum.com/showthread.php?threadid=31878 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ComboBox ListFillRange | Excel Discussion (Misc queries) | |||
Combo box - Listfillrange | Excel Discussion (Misc queries) | |||
Strange problem with a combobox and ListFillRange | Excel Discussion (Misc queries) | |||
ListFillRange | Excel Programming | |||
ListFillRange | Excel Programming |