Results 1 to 8 of 8

Accessing a grouped ActiveX control's properties using VBA

Threaded View

deadlyduck Accessing a grouped ActiveX... 10-27-2010, 07:09 PM
Leith Ross Re: Accessing a grouped... 10-27-2010, 07:38 PM
deadlyduck Re: Accessing a grouped... 10-28-2010, 04:28 AM
Leith Ross Re: Accessing a grouped... 10-28-2010, 04:38 AM
Andy Pope Re: Accessing a grouped... 10-28-2010, 04:43 AM
deadlyduck Re: Accessing a grouped... 10-28-2010, 04:44 AM
romperstomper Re: Accessing a grouped... 10-28-2010, 04:48 AM
deadlyduck Re: Accessing a grouped... 10-28-2010, 05:02 AM
  1. #1
    Valued Forum Contributor
    Join Date
    08-31-2007
    Location
    SW Ireland
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2311 Build 16.0.17029.20068) 32-bit
    Posts
    540

    Accessing a grouped ActiveX control's properties using VBA

    Hi,

    I have grouped a couple of activeX combobox controls (the groupname is 'piechartgroup').

    I am trying to use VB to change the value property of 'combobox1' (the default name given by the VB editor when that particular combobox was created but am running into problems.

    The following code attempts didn't work:

    'Effort 1- trying to directly access the control: 
    Activesheet.shapes("combobox1").value="Hello"
    
    'Effort 2:- trying to access the control via the group
    Activesheet.shapes("piechartgroup").shapes("combobox1").value="Hello"
    
    'Effort 3- using the groupitems approach
    
    Activesheet.shapes("piechartgroup").groupitems("combobox1").value="Hello"
    Can anyone indicate the required code to access a particular Activex control which is part of a group?

    Thanks in advance,

    Brian
    Last edited by deadlyduck; 10-28-2010 at 05:02 AM.
    Excel 365 user. To unblock a downloaded macro-enabled workbook, go to your "Downloads" folder > right click on the workbook name > click 'Properties' > check the 'Unblock' checkbox. You can now open the workbook.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1