+ Reply to Thread
Results 1 to 8 of 8

Using a combobox to select sheet where data is to be copied from a userform

  1. #1
    Registered User
    Join Date
    02-03-2009
    Location
    Upstate New York
    MS-Off Ver
    Excel 2003
    Posts
    31

    Using a combobox to select sheet where data is to be copied from a userform

    Before I describe my problem. I have to say this forum is awesome. I first started browsing as a guest and learned a lot. When I got into my current jam, I decided to register a few days ago and ask for help. I have since tried searching keywords for help but no luck. So here goes my first post.

    The macro below in its current state adds data entered from the userform to a specific sheet. I would like to change it so that a player can be selected from combobox named txtmplayer and the data entered be copied to that specific players sheet.

    If this information is vital: There are 8 players. Player sheets can be named player1, player2, and so on. I would like to keep same method for entry (finds first available row)

    Thanks in advance for any help.

    -Chris

    Please Login or Register  to view this content.
    Last edited by Ceeseven; 02-06-2009 at 01:41 PM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Using a combobox to select sheet where data is to be copied from a userform

    Attach the workbook.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    02-03-2009
    Location
    Upstate New York
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: Using a combobox to select sheet where data is to be copied from a userform

    as requested.

    thanks.
    Attached Files Attached Files

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Using a combobox to select sheet where data is to be copied from a userform

    hy have you renamed the Comobox control to start with txt/ It's normal practise to choose a name that helps identify the control, so I wold use cbo to denote a ComboBox and player, eg. cboPlayer

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-03-2009
    Location
    Upstate New York
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: Using a combobox to select sheet where data is to be copied from a userform

    yes
    when i first started with vba i got into that bad habit
    list, combo and text boxes in that macro are all named txt something
    sorry

  6. #6
    Registered User
    Join Date
    02-03-2009
    Location
    Upstate New York
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: Using a combobox to select sheet where data is to be copied from a userform

    I answered your question without even noticing the corrected code.

    Thank you for the help. And in the future i will use the norm when it comes to naming to make help easier. Thanks again,
    -Chris

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Using a combobox to select sheet where data is to be copied from a userform

    Quote Originally Posted by Ceeseven View Post
    yes
    when i first started with vba i got into that bad habit
    list, combo and text boxes in that macro are all named txt something
    sorry
    That's more confusing than not renaming them, you really need to stop it.

    Have you checked the code?

  8. #8
    Registered User
    Join Date
    02-03-2009
    Location
    Upstate New York
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: Using a combobox to select sheet where data is to be copied from a userform

    Quote Originally Posted by royUK View Post
    That's more confusing than not renaming them, you really need to stop it.

    Have you checked the code?
    lesson learned.

    yes it works great.
    i had prevoiusly tried something similar. i was soooo close.
    thanks again

+ 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