Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Mar 2002
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Simple Combobox questions (VBA)

    How do I code to combo box to which row is selected by the user?

  2. #2
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Simple Combobox questions (VBA)

    Yes, that is a simple combobox question, if you define simple as short. However, it is not simple for us because we need to know such things as: what program (Access, Excel...), in what (form, UserForm, document), and what do you want to do with it? Thanks! --Sam
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  3. #3
    2 Star Lounger
    Join Date
    Mar 2002
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Simple Combobox questions (VBA)

    It is for a form in excel, the combo box lists the data in column A (which is a date), I want to choose a enter and enter information into other textboxs in that row. Hope this helps, I'm new to VBA

  4. #4
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Simple Combobox questions (VBA)

    Comboboxes mess up dates when one is selected, so this is not a simple question, but I'll try to post an example in a later post. Meanwhile, here are two simpler alternatives:
    (1) Keep the data in Access where designing forms is simple
    (2) Use Excel's data forms, try the Data | Form menu (attached workbook shows how to automatically startup the Data Form)

    HTH --Sam
    Attached Files Attached Files
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  5. #5
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Simple Combobox questions (VBA)

    Attached is a sample worksheet and userform which is hopefully similar to what you want. I got around the date format problem by adding each data manually via AddIten instead of using the RowSource property. I used the control source property for the textboxes to show the format problem: no dollar formatting in TextBox3. Again you can get around it manually with a change event for each TextBox, but that's too much work. Access is the way to go for forms. HTH --Sam
    Attached Files Attached Files
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  6. #6
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Simple Combobox questions (VBA)

    Note, on both of the above attachments, it is better to save the file and open it in Excel. At least for IE6 that I am using, you only see the form, not the worksheet. --Sam
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

Posting Permissions

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