Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Mar 2002
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    UserForm (Excel 98)

    I am trying to create a UserForm that has a "list table" with a list of names in it, a "New" ,"EnterName" "OK" and a "Cancel" buttons.
    I would like to be able to select any cell and then goto the UserForm select a name from the list and then push ok for the name from the UserForm to be entered into the Selected Cell on sheet1.
    Also I would like to be able to enter new names to the list by pushing the New button on the UserForm.
    I have tried to create this but my VB knowledge is not that great as I am learn VB any help would be much appricated.

    thanks
    Jonathon

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: UserForm (Excel 98)

    If you will upload a sample of what your have done, we will try to help you get it working.
    Legare Coleman

  3. #3
    New Lounger
    Join Date
    Mar 2002
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: UserForm (Excel 98)

    here is the Spreadsheet sorry about the time delay we had a power cut here in Dunedin new Zealand and the internet was down.

    any help would be appreciated
    Attached Files Attached Files

  4. #4
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Dallas plus 20 miles or so, Texas, USA
    Posts
    876
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: UserForm (Excel 98)

    From the looks of your spreadsheet, I think you would be much better off to use the drop down list available in data validation, and maybe one of the lookup functions to return the corresponding information with each name. You might however, use a userform textbox to add a name to the validation list depending upon how much functionality you wish to give to the user.

    To use the dropdown list, select Data/Validation and then enter the range in which the source for your list resides.

  5. #5
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: UserForm (Excel 98)

    Michael has already givne you one way to accomplish what you want to do. However, if you still want to use a user form, then there I have some suggestions to start with:

    1- A Textbox is probably not the right control to use to give the user a list of names from which to choose. There are a lot of reasons, but to cut it short, it is hard for the user to select and even harder for your code to figure out what he selected. A better choice would be a Combo Box.

    2- You can't keep the list of names in the value property of the control. You will need to keep the list on a spreadsheet and load them into the Combobox in the form initilize routine.

    If you still want to use a userform, and if the above are OK, then let me know and I will help you set it up.
    Legare Coleman

Posting Permissions

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