Consulting

Results 1 to 5 of 5

Thread: User Form error

  1. #1
    Moderator VBAX Master austenr's Avatar
    Joined
    Sep 2004
    Location
    Maine
    Posts
    2,032
    Location

    User Form error

    I have the following in Workbook_Open

     Private Sub Workbook_Open()
    
    frmUserForm1.Show
    
    end sub
    getting a run time error "object required" dont get it. Complete workbook attached
    Attached Files Attached Files
    Peace of mind is found in some of the strangest places.

  2. #2
    VBAX Mentor
    Joined
    Dec 2008
    Posts
    374
    Location
    Check the name of the form you are calling.

    Artik

  3. #3
    Moderator VBAX Master austenr's Avatar
    Joined
    Sep 2004
    Location
    Maine
    Posts
    2,032
    Location
    Quote Originally Posted by Artik View Post
    Check the name of the form you are calling.

    Artik
    Thanks fixed it. One more thing does the combo box look right to you? What ever I select it doesnt copy the cell contents.
    Peace of mind is found in some of the strangest places.

  4. #4

  5. #5
    Moderator VBAX Wizard SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,236
    Location
    cmbComboBox_Change() is misnamed

    Making this one change to your code works
    Private Sub ComboBox1_Change()
    This entire UserForm Code works a treat
    Private Sub ComboBox1_Change()
        Sheet1.Range("I:I").Cells(ComboBox1.ListIndex + 2).Copy
    End Sub
    
    Private Sub UserForm_Initialize()
        UserForm1.ComboBox1.RowSource = "H2:H19"
    End Sub
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

Posting Permissions

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