Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Transpose technique not populating ListFillRange of ActiveX combobox

I'm using a Forms combobox to make a selection from a horizontal range
named "Labels".

This code works on the Forms combobox:

' Add combo box 1 for channel 1
ActiveSheet.DropDowns.Add(0, 63.75, 82.5, 15.75).Select
With Selection
.ListFillRange = ""
.List =
Application.WorksheetFunction.Transpose(Range("Lab els"))
End With

I'd like to use the richer ActiveX combobox instead to use features
such as MatchEntry.

Naturally, I tried using the same Transpose technique with an ActiveX
combobox but without success:

' create combo box with the Controls toolbar
Dim myCB As OLEObject
Set myCB = ActiveSheet.OLEObjects.Add(ClassType:="Forms.Combo Box.
1", Link:=False, _
DisplayAsIcon:=False, Left:=0, Top:=127.5, Width:=82.5,
Height:=12.75 _
)

myCB.ListFillRange =
Application.WorksheetFunction.Transpose(Range("Lab els"))
ERROR:"Run-time error '13: Type mis-match"


I can make it work if I set the ListFillRange to a transposed range of
"Labels" but that isn't as satisfying as using the Transpose function.

I'm missing something real basic here but can't figure it out.

Anyone?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Transpose technique not populating ListFillRange of ActiveX combobox

..listfillrange needs to have a range.

You used .list with the dropdown from the Forms toolbar. You can use .list with
the combobox from the control toolbox toolbar:

myCB.Object.List = Application.WorksheetFunction.Transpose(Range("Lab els"))



JimC wrote:

I'm using a Forms combobox to make a selection from a horizontal range
named "Labels".

This code works on the Forms combobox:

' Add combo box 1 for channel 1
ActiveSheet.DropDowns.Add(0, 63.75, 82.5, 15.75).Select
With Selection
.ListFillRange = ""
.List =
Application.WorksheetFunction.Transpose(Range("Lab els"))
End With

I'd like to use the richer ActiveX combobox instead to use features
such as MatchEntry.

Naturally, I tried using the same Transpose technique with an ActiveX
combobox but without success:

' create combo box with the Controls toolbar
Dim myCB As OLEObject
Set myCB = ActiveSheet.OLEObjects.Add(ClassType:="Forms.Combo Box.
1", Link:=False, _
DisplayAsIcon:=False, Left:=0, Top:=127.5, Width:=82.5,
Height:=12.75 _
)

myCB.ListFillRange =
Application.WorksheetFunction.Transpose(Range("Lab els"))
ERROR:"Run-time error '13: Type mis-match"


I can make it work if I set the ListFillRange to a transposed range of
"Labels" but that isn't as satisfying as using the Transpose function.

I'm missing something real basic here but can't figure it out.

Anyone?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Transpose technique not populating ListFillRange of ActiveXcombobox

On Sep 5, 7:12*pm, Dave Peterson wrote:
.listfillrange needs to have a range. *

You used .list with the dropdown from the Forms toolbar. *You can use .list with
the combobox from the control toolbox toolbar:

myCB.Object.List = Application.WorksheetFunction.Transpose(Range("Lab els"))





JimC wrote:

I'm using a Forms combobox to make a selection from a horizontal range
named "Labels".


This code works on the Forms combobox:


* ' Add combo box 1 for channel 1
* * ActiveSheet.DropDowns.Add(0, 63.75, 82.5, 15.75).Select
* * With Selection
* * * * .ListFillRange = ""
* * * * .List =
Application.WorksheetFunction.Transpose(Range("Lab els"))
* * End With


I'd like to use the richer ActiveX combobox instead to use features
such as MatchEntry.


Naturally, I tried using the same Transpose technique with an ActiveX
combobox but without success:


* ' create combo box with the Controls toolbar
* * Dim myCB As OLEObject
* * Set myCB = ActiveSheet.OLEObjects.Add(ClassType:="Forms.Combo Box.
1", Link:=False, _
* * * * DisplayAsIcon:=False, Left:=0, Top:=127.5, Width:=82.5,
Height:=12.75 _
* * * * )


* * myCB.ListFillRange =
Application.WorksheetFunction.Transpose(Range("Lab els"))
* * * * * ERROR:"Run-time error '13: Type mis-match"


I can make it work if I set the ListFillRange to a transposed range of
"Labels" but that isn't as satisfying as using the Transpose function.


I'm missing something real basic here but can't figure it out.


Anyone?


--

Dave Peterson- Hide quoted text -

- Show quoted text -


It worked! Of course, you knew that. Thanks for the help.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ActiveX combobox aqualibra Excel Worksheet Functions 1 August 24th 08 07:54 AM
ActiveX Combobox and LinkedCell aqualibra Excel Worksheet Functions 2 August 21st 08 08:36 PM
ComboBox ListFillRange Stefi Excel Discussion (Misc queries) 14 April 21st 08 12:55 PM
HELP PLEASE..Inserting combobox (ActiveX control) makes workbook c Inquiringmind Excel Discussion (Misc queries) 0 February 10th 07 11:01 AM
Strange problem with a combobox and ListFillRange teddyk Excel Discussion (Misc queries) 1 August 7th 06 09:16 PM


All times are GMT +1. The time now is 09:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"