+ Reply to Thread
Results 1 to 3 of 3

Set the value of a combobox

  1. #1
    Bruce
    Guest

    Set the value of a combobox

    I have a combobox that I want to set the value of as a default, but I get the
    error
    'Object doesn't support this property or method'.

    Any ideas on how to fix?

    Bruce

    Sub reset()
    Set Sheets("Sheet1").Shapes("ComboBox1").Value = 3
    End Sub



  2. #2
    papou
    Guest

    Re: Set the value of a combobox

    Hello Bruce
    If combo from the Tools Box, try this:
    Sheet1.ComboBox1.Value = 3

    HTH
    Cordially
    Pascal

    "Bruce" <[email protected]> a écrit dans le message de
    news:[email protected]...
    > I have a combobox that I want to set the value of as a default, but I get

    the
    > error
    > 'Object doesn't support this property or method'.
    >
    > Any ideas on how to fix?
    >
    > Bruce
    >
    > Sub reset()
    > Set Sheets("Sheet1").Shapes("ComboBox1").Value = 3
    > End Sub
    >
    >




  3. #3
    Bob Phillips
    Guest

    Re: Set the value of a combobox

    Bruce,

    Set is used to create an object variable. The value of a combobox is a
    property, so you do not use set.

    Which combobox type are you using?

    --
    HTH

    Bob Phillips

    "Bruce" <[email protected]> wrote in message
    news:[email protected]...
    > I have a combobox that I want to set the value of as a default, but I get

    the
    > error
    > 'Object doesn't support this property or method'.
    >
    > Any ideas on how to fix?
    >
    > Bruce
    >
    > Sub reset()
    > Set Sheets("Sheet1").Shapes("ComboBox1").Value = 3
    > End Sub
    >
    >




+ Reply to Thread

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