+ Reply to Thread
Results 1 to 8 of 8

Save as macro based on multiple options

  1. #1
    Registered User
    Join Date
    08-22-2012
    Location
    Townsville
    MS-Off Ver
    Excel 2010
    Posts
    38

    Save as macro based on multiple options

    Hi,

    I have created a macro for multiple (about 5) people to run. At the start of the macro I would like them to choose their name from either a drop down box or a userform option button then click ok, once they click ok it would then save the file in their own folder and the filename with todays date, and then continue running the macro.

    For example:
    Bob B --> saves in c:\excel\Bob B\
    Claire S --> saves in c:\excel\Claire S\

    I can do a single save as macro but I have never delt with userforms or anything to give multiple options.

    Any help would be greatly appreciated and sorry if that didn't make sense. Btw I am using excel 2003.

    Cheers

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Save as macro based on multiple options

    Hi

    Why don't you use environ("username") or application.username to determine their "name" and file accordingly? That way the user doesn't have to make any selection.

    rylo

  3. #3
    Valued Forum Contributor
    Join Date
    11-15-2008
    Location
    ph
    MS-Off Ver
    2007/2010/2016
    Posts
    479

    Re: Save as macro based on multiple options

    Hi -

    Try;
    Please Login or Register  to view this content.
    Regards,
    event

  4. #4
    Registered User
    Join Date
    08-22-2012
    Location
    Townsville
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Save as macro based on multiple options

    Thanks for the replies.

    rylo I didn't want to use that as the folder relates to their position not their name sorry - should have made that clear in my first post.
    Thanks event21 will try that, but not sure as i haven't worked with combo boxes before.

  5. #5
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Save as macro based on multiple options

    Hi

    Well, how about building a lookup table that maps the username to whatever is being used to generate the path? Position, or something else?

    rylo

  6. #6
    Registered User
    Join Date
    08-22-2012
    Location
    Townsville
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Save as macro based on multiple options

    Hey rylo,
    I created this as an add-in so they just open it and it runs straight away as the spreadsheet they get straight from an export from another database. I'm not sure how I would do that with an add-in, I'm not really that good at macros...
    Cheers

  7. #7
    Valued Forum Contributor
    Join Date
    11-15-2008
    Location
    ph
    MS-Off Ver
    2007/2010/2016
    Posts
    479

    Re: Save as macro based on multiple options

    Hi -
    Thanks event21 will try that, but not sure as i haven't worked with combo boxes before.
    You need to post your macro here.

    Regards,
    event

  8. #8
    Registered User
    Join Date
    08-22-2012
    Location
    Townsville
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Save as macro based on multiple options

    I've worked out how to use the option buttons and then go back to the macro.. Thanks for your help anyways

+ 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