+ Reply to Thread
Results 1 to 5 of 5

save data to worksheet dependent on userform dropdown

  1. #1
    Registered User
    Join Date
    07-06-2009
    Location
    Miami. OK
    MS-Off Ver
    Excel 2003
    Posts
    23

    save data to worksheet dependent on userform dropdown

    Hi All, I'm a little out of my element(normally program PLC's). I have always been lucky on searching others programs and have been real successful at piecing them together to fit the application I needed.
    The current workbook I am working on for my supervisor will allow him to keep track of personnel's weekly job assignments. The workbook and userform work fine when just using one worksheet.

    What i would like to be able to do is use the "assigned to" combobox be the indicator as to which worksheet the data is saved to. I have tried to do it several different ways but have been un-successful. Have spent the last two days reading and searching for a solution but have yet to find or understand one.

    Thanks in advance for any advice and direction anyone is able to give me.
    Attached Files Attached Files
    Last edited by mhill; 07-17-2009 at 03:58 PM.

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: save data to worksheet dependent on userform dropdown

    See if the attached is of any help.

    Here's what was done:

    One worksheets holds a list of names and is the RowSource for a combobox. This list is a dynamic named range.
    Each item in the list is the name of a worksheet

    This basic code pass the value of the combobox as the string for the worksheet name.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    07-06-2009
    Location
    Miami. OK
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: save data to worksheet dependent on userform dropdown

    Thanks Palmetto. Not for sure what I am doing wrong but I am unable to incorporate "strname as string" into my workbook. It's probable something simple I'm overlooking or might be I've looked at this too long.
    I'll keep on it till I'm finished though. thanks again

  4. #4
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: save data to worksheet dependent on userform dropdown

    Hi mhill,

    Getting anywhere?

    I got a moment to look at your workbook and added my code to your command button (disabled yours for testing purposes).

    See the attached.

    I think it is more efficient (less code) to set the RowSource property of a list box to a named range, which I've done in your workbook. Had to add a sheet and create a list (dynamic named range) for testing.

    HTH,

    Palmetto
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-06-2009
    Location
    Miami. OK
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: save data to worksheet dependent on userform dropdown

    Palmetto,

    Thank you for taking to time to insert and correct this, saved me a lot of time.

    Works great.

    Thanks again

    Martin

+ 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