+ Reply to Thread
Results 1 to 3 of 3

Need help with Excel Form & ComboBox Tutorial

  1. #1
    tmb
    Guest

    Need help with Excel Form & ComboBox Tutorial

    At http://www.excel-vba.com/v-forms-controls.htm

    I have followed instructions... my code on the form is below but it won't
    run... I've marked the error...

    Can anybody give me any help with this?

    thanks

    Code is below--------------

    Private Sub cmdBtnSubmit_Click()
    shReport.Range("C4").Value = cbxCity.Value
    cbxCity.Value = "Select a City"
    frmCity.Hide
    End Sub

    Private Sub cmdCityCancel_Click()

    cbxCity.Value = "Select a City"
    frmCity.Hide

    End Sub

    Private Sub UserForm_Activate()

    shParameterst.Activate '<-----Run Time Error 424 - Object Required
    cbxCity.ColumnCount = 1
    cbxCity.RowSource = "A1:A5"

    End Sub



  2. #2
    liuhao
    Guest

    Re: Need help with Excel Form & ComboBox Tutorial

    Hi,tmb

    Perhaps the Worksheet named "shParameterst" has been deleted or rename
    ,please check it.




    "tmb" <[email protected]> дÈëÓʼþ
    news:[email protected]...
    > At http://www.excel-vba.com/v-forms-controls.htm
    >
    > I have followed instructions... my code on the form is below but it won't
    > run... I've marked the error...
    >
    > Can anybody give me any help with this?
    >
    > thanks
    >
    > Code is below--------------
    >
    > Private Sub cmdBtnSubmit_Click()
    > shReport.Range("C4").Value = cbxCity.Value
    > cbxCity.Value = "Select a City"
    > frmCity.Hide
    > End Sub
    >
    > Private Sub cmdCityCancel_Click()
    >
    > cbxCity.Value = "Select a City"
    > frmCity.Hide
    >
    > End Sub
    >
    > Private Sub UserForm_Activate()
    >
    > shParameterst.Activate '<-----Run Time Error 424 - Object Required
    > cbxCity.ColumnCount = 1
    > cbxCity.RowSource = "A1:A5"
    >
    > End Sub
    >
    >




  3. #3
    Bob Phillips
    Guest

    Re: Need help with Excel Form & ComboBox Tutorial

    What they seem to be forgetting to tell you is that you need to rename the
    codename of the worksheet with the data to shParameters. Note the codename,
    not the name that you see in the sheet tab in Excel.

    To do this, select the sheet in the VBE, hit F4, and a properties window
    should be there, with the Name property highlighted. Change the value there.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "tmb" <[email protected]> wrote in message
    news:[email protected]...
    > At http://www.excel-vba.com/v-forms-controls.htm
    >
    > I have followed instructions... my code on the form is below but it won't
    > run... I've marked the error...
    >
    > Can anybody give me any help with this?
    >
    > thanks
    >
    > Code is below--------------
    >
    > Private Sub cmdBtnSubmit_Click()
    > shReport.Range("C4").Value = cbxCity.Value
    > cbxCity.Value = "Select a City"
    > frmCity.Hide
    > End Sub
    >
    > Private Sub cmdCityCancel_Click()
    >
    > cbxCity.Value = "Select a City"
    > frmCity.Hide
    >
    > End Sub
    >
    > Private Sub UserForm_Activate()
    >
    > shParameterst.Activate '<-----Run Time Error 424 - Object Required
    > cbxCity.ColumnCount = 1
    > cbxCity.RowSource = "A1:A5"
    >
    > 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