Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default XL2k: ActiveX Controls on sheets.

I can't seem manipulate ActiveX controls on sheets from public VB code.

This code works:
Debug.Print ThisWorkbook.Worksheets("Sheet1").OLEObjects("Comb oBox1").Name

It returns the name of an ActiveX combo box... But, I can't use, for
instance, .AddItem instead of .Name.

Maybe the problem is that the properties and methods for MSXL's ActiveX
controls on sheets are different from the properties and methods used to
manipulate the same controls on forms? If that is the case, I can't find a
list of properties and methods :(

If someone could point me in the right direction, I would appreciate it!

Thanks everyone.
-Mike


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default ActiveX Controls on sheets.

ThisWorkbook.Worksheets("Sheet1").OLEObjects("Comb oBox1").Object.AddItem
"item1"

the OLEObject is the container. The object is the combobox. A property
like the listfillrange belongs to the container, however.

--
Regards,
Tom Ogilvy




"Mike Mertes" wrote in message
...
I can't seem manipulate ActiveX controls on sheets from public VB code.

This code works:
Debug.Print ThisWorkbook.Worksheets("Sheet1").OLEObjects("Comb oBox1").Name

It returns the name of an ActiveX combo box... But, I can't use, for
instance, .AddItem instead of .Name.

Maybe the problem is that the properties and methods for MSXL's ActiveX
controls on sheets are different from the properties and methods used to
manipulate the same controls on forms? If that is the case, I can't find a
list of properties and methods :(

If someone could point me in the right direction, I would appreciate it!

Thanks everyone.
-Mike




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default ActiveX Controls on sheets.

Aha! Problem solved.

Thanks Tom! The world owes you a hand for disolving ignorance! Share your
knowledge, spread it well... ;)

"Tom Ogilvy" wrote in message
...
ThisWorkbook.Worksheets("Sheet1").OLEObjects("Comb oBox1").Object.AddItem
"item1"

the OLEObject is the container. The object is the combobox. A property
like the listfillrange belongs to the container, however.

--
Regards,
Tom Ogilvy




"Mike Mertes" wrote in message
...
I can't seem manipulate ActiveX controls on sheets from public VB code.

This code works:
Debug.Print

ThisWorkbook.Worksheets("Sheet1").OLEObjects("Comb oBox1").Name

It returns the name of an ActiveX combo box... But, I can't use, for
instance, .AddItem instead of .Name.

Maybe the problem is that the properties and methods for MSXL's ActiveX
controls on sheets are different from the properties and methods used to
manipulate the same controls on forms? If that is the case, I can't find

a
list of properties and methods :(

If someone could point me in the right direction, I would appreciate it!

Thanks everyone.
-Mike






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 Controls leerem Excel Discussion (Misc queries) 0 December 11th 08 01:11 PM
ActiveX Controls Charly Excel Discussion (Misc queries) 1 October 18th 06 01:53 PM
ActiveX Controls vs Form Controls Alex Excel Discussion (Misc queries) 1 January 11th 06 08:46 AM
ActiveX Controls David Fixemer Excel Programming 4 February 16th 04 05:20 PM
ActiveX Controls on Excel sheets George Cooper Excel Programming 0 July 16th 03 07:54 AM


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