Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Mar 2002
    Location
    Germany, Germany
    Posts
    169
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Limitations with MSForms.ComboBox (XP SP3)

    Hello everybody,

    I try to pass a MSForms.ComboBox as a parameter to a subroutine. There I have some code nested which is intended to react to the name of the ComboBox. The only problem is: there is no name property. It is there, when I use the original instance of the ComboBox but it disappears as soon as I declare a variable as MSForms.ComboBox. There are other methods and properties that are also unavailable. I did not experience the problem when I tried out a MSForms.Textbox.
    Is there a workaround for this? Is this a problem only in Excel XP? I would be glad if somebody had an idea about this.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Limitations with MSForms.ComboBox (XP SP3)

    Try defining the argument as MSForms.Control instead of MSForms.ComboBox.

  3. #3
    2 Star Lounger
    Join Date
    Mar 2002
    Location
    Germany, Germany
    Posts
    169
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Limitations with MSForms.ComboBox (XP SP3)

    Hello Hans,

    thank you very much for the idea. Of cource, this did the trick. Now you mentioned it, it seems to be obvious to do this.
    Thanks again for opening my eyes!!

  4. #4
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Limitations with MSForms.ComboBox (XP SP3)

    The intellisense list sometimes just gets it wrong. You can still declare your variable as an msforms.combobox and use it's name property, I just tried and it works fine. Note that if you declare as msforms.control the list is also incomplete, but properties applicable to a specific control do work. I'd declare as combo if I were you.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  5. #5
    2 Star Lounger
    Join Date
    Mar 2002
    Location
    Germany, Germany
    Posts
    169
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Limitations with MSForms.ComboBox (XP SP3)

    Hello Jan Karel,

    thank you for your reply. You are right, it works well. I got really confused to find IntelliSense is not working. I have already modified my code.
    Thanks to you all, who give such excellent support in this forum. Without you all, I would frequently feel lost ...

Posting Permissions

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