Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Combobox Vs Combobox

I am using Excel 2000.

I created a sheet that automatically creates and adds comboboxes into the
row where new data was entered. I am using the code:

ActiveSheet.OLEObjects.Add(ClassType:="Forms.Combo Box.1", Link:=False, _
DisplayAsIcon:=False, Left:=sLeftVal, Top:=sTopVal, Width:=sWidth,
Height:= _
sHeight).Select

this code adds a VBA combobox, which is what I want as I want to create
multi-columned comboboxes. The problem comes up that in order to access the
columns method of the VBA combobox, I need to call the combobox by name
(application.combobox1). If I use the shapes("Combobox1") path, Excel
considers the combobox an excel combobox, and has no columns property. So i
want to find out if there is a way to use varient to call a specific
combobox, so that it allows the use of the columns property. A friend
suggested creating an array of comboboxes (rcombobox() as combobox) but now I
can't find a method in excel that will let me load that array with VBA
comboboxes. Any help would be most appriciated.
--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Combobox Vs Combobox


set OleObj =ActiveSheet.OLEObjects.Add( _
ClassType:="Forms.ComboBox.1", _
Link:=False, _
DisplayAsIcon:=False, _
Left:=sLeftVal, _
Top:=sTopVal, _
Width:=sWidth, _
Height:= _
sHeight
OleObj.Name = "ComboboxAA"

now
Activesheet.OleObjects("ComboboxAA") is an OleObject
Activesheet.OleObjects("ComboboxAA").Object is a VBA combobox

--
Regards,
Tom Ogilvy


"J Streger" wrote in message
...
I am using Excel 2000.

I created a sheet that automatically creates and adds comboboxes into the
row where new data was entered. I am using the code:

ActiveSheet.OLEObjects.Add(ClassType:="Forms.Combo Box.1",

Link:=False, _
DisplayAsIcon:=False, Left:=sLeftVal, Top:=sTopVal, Width:=sWidth,
Height:= _
sHeight).Select

this code adds a VBA combobox, which is what I want as I want to create
multi-columned comboboxes. The problem comes up that in order to access

the
columns method of the VBA combobox, I need to call the combobox by name
(application.combobox1). If I use the shapes("Combobox1") path, Excel
considers the combobox an excel combobox, and has no columns property. So

i
want to find out if there is a way to use varient to call a specific
combobox, so that it allows the use of the columns property. A friend
suggested creating an array of comboboxes (rcombobox() as combobox) but

now I
can't find a method in excel that will let me load that array with VBA
comboboxes. Any help would be most appriciated.
--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Combobox Vs Combobox

Thank you very much. That is exactly what I needed!

"Tom Ogilvy" wrote:


set OleObj =ActiveSheet.OLEObjects.Add( _
ClassType:="Forms.ComboBox.1", _
Link:=False, _
DisplayAsIcon:=False, _
Left:=sLeftVal, _
Top:=sTopVal, _
Width:=sWidth, _
Height:= _
sHeight
OleObj.Name = "ComboboxAA"

now
Activesheet.OleObjects("ComboboxAA") is an OleObject
Activesheet.OleObjects("ComboboxAA").Object is a VBA combobox

--
Regards,
Tom Ogilvy


"J Streger" wrote in message
...
I am using Excel 2000.

I created a sheet that automatically creates and adds comboboxes into the
row where new data was entered. I am using the code:

ActiveSheet.OLEObjects.Add(ClassType:="Forms.Combo Box.1",

Link:=False, _
DisplayAsIcon:=False, Left:=sLeftVal, Top:=sTopVal, Width:=sWidth,
Height:= _
sHeight).Select

this code adds a VBA combobox, which is what I want as I want to create
multi-columned comboboxes. The problem comes up that in order to access

the
columns method of the VBA combobox, I need to call the combobox by name
(application.combobox1). If I use the shapes("Combobox1") path, Excel
considers the combobox an excel combobox, and has no columns property. So

i
want to find out if there is a way to use varient to call a specific
combobox, so that it allows the use of the columns property. A friend
suggested creating an array of comboboxes (rcombobox() as combobox) but

now I
can't find a method in excel that will let me load that array with VBA
comboboxes. Any help would be most appriciated.
--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003




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
fill combobox depending on selection from another combobox Adam Francis Excel Discussion (Misc queries) 2 July 24th 08 07:39 PM
combobox into another combobox girlie New Users to Excel 1 September 26th 06 10:31 AM
How Do I Load A ComboBox RowSource From The Results Of Another ComboBox Minitman[_4_] Excel Programming 3 October 26th 04 07:58 PM
Populating combobox from another combobox David Goodall Excel Programming 1 September 12th 04 03:42 PM
ComboBox Avner Mediouni Excel Programming 1 September 4th 03 03:18 PM


All times are GMT +1. The time now is 11:06 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"