+ Reply to Thread
Results 1 to 8 of 8

Macro - send a file to a specific location

  1. #1
    Registered User
    Join Date
    12-27-2006
    Location
    Australia
    MS-Off Ver
    Microsoft 365
    Posts
    87

    Macro - send a file to a specific location

    I am creating a workbook of multiple worksheets. Each worksheet needs to be manipulated by different people away from the workbook and then returned to the workbook with new data.

    In the past I have done this with a macro that saves the worksheet as a new file to a floppy disk in "a:/: drive because of the consistent nomenclature.

    However, floppy disks are now defunct.

    I need the macro to go to send the worksheet to a new specified location.

    If there any way of having a user specify where to send the file eg to a data stick on f:/?

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    This code might help. It saves the activesheet to a drive. Change the path as required.

    Please Login or Register  to view this content.
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    12-27-2006
    Location
    Australia
    MS-Off Ver
    Microsoft 365
    Posts
    87
    That's great. It enables user to input file name. Is there any way they can also input the drive and folder location. Eg. memory sticks in USB ports can be anything from d to z?

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    This is the best I can give you. Allows you to name the file and pick the drive. Drive code from John Walkenback site

    http://j-walk.com/ss/excel/tips/tip29.htm

    Please Login or Register  to view this content.
    VBA Noob

  5. #5
    Registered User
    Join Date
    12-27-2006
    Location
    Australia
    MS-Off Ver
    Microsoft 365
    Posts
    87
    Thank you for your help. You have spent much more time than I expected with me.

    When I load the code and run the macro I get the following error message.

    Compile error.
    Cannot name a Public User defined type within an object module.

    I there something I have done/not done. I checked out the website you mentioned and added the first line that was missing but the same message appeared.

    Thank you

    Bob

  6. #6
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by Bob1955
    Thank you for your help. You have spent much more time than I expected with me.

    When I load the code and run the macro I get the following error message.

    Compile error.
    Cannot name a Public User defined type within an object module.

    I there something I have done/not done. I checked out the website you mentioned and added the first line that was missing but the same message appeared.

    Thank you

    Bob
    Hi,

    which Code sheet did you put the code into?

    ---added,

    from the site:
    The GetDirectory function
    The GetDirectory function is listed below. To use this function, copy the text and paste it to a VBA module.
    isn't too specific about the word MODULE which is probably where you need to put that, not in a Sheet code.
    Last edited by Bryan Hessey; 12-27-2006 at 08:53 PM.
    Si fractum non sit, noli id reficere.

  7. #7
    Registered User
    Join Date
    12-27-2006
    Location
    Australia
    MS-Off Ver
    Microsoft 365
    Posts
    87

    Thumbs up

    That did it!

    Thank you guys for all your help.

  8. #8
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Bob1955,

    Glad you got an answer.

    Bryan,

    Thanks for the assist

    VBA Noob

+ 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