+ Reply to Thread
Results 1 to 7 of 7

save as .xls from a cell value and in a specific location on Mac

  1. #1
    Registered User
    Join Date
    07-28-2010
    Location
    Parma, Italy
    MS-Off Ver
    Excel 2003
    Posts
    7

    save as .xls from a cell value and in a specific location on Mac

    Hi JBeaucaire, now I understood what you meant about making use in the code o the directory variable. Everywhere in the net I see the path concatenated with the file name, the same you have suggested to me, as it follows

    Please Login or Register  to view this content.

    but on Mac that path come out within the file name ignoring it as a location of tthe saved new file. It may be a Mac problem, and I don't who to ask to. There is any apple script to do the same? I have also excel 2008 for Mac, which I should use instead of using the previous version beacuse of a vba makro. Thank you again. Marzia

    Follows original post, hope I made it right this time. cheers


    Hi there, please help me! I have such a headache! I know nothing about VBA and I need to work out a makro which I copied somewhere else. All I need to do is described in different ways in this forum but anyone of these codes I found seem to be suitable for me. My need is saving a xls file with a name from a cell and in a specific location in my computer. I'm using Mac and Excel 2004. The following code creates the file with the name I want and this is ok, but then, what it's happening is that the path where the file need to be saved is completely ignored! the file is saved in the first window that is open on the desktop. I don't even know if the path i put (//localhost...) is correct since everywhere I found examples on pc (C:\) and this is not helping me at all. Hope to receive some help. Thank you very much! Marzia

    my code:

    Please Login or Register  to view this content.
    Last edited by Marzia; 07-29-2010 at 12:28 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: save as .xls from a cell value and in a specific location on Mac

    Welcome to the forum. Be sure to read through the Forum Rules so you can use and follow them effectively. For instance, you'll need to EDIT that post above and put code tags around that code you used. (Like shown here)

    Your code doesn't make use of the directory variable you created. Only you can verify if the string you're using is correct, but the syntax would be:


    Please Login or Register  to view this content.

    Notice I added the missing / at the end of your directory string.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    07-28-2010
    Location
    Parma, Italy
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: save as .xls from a cell value and in a specific location on Mac

    Thank you JBeaucaire for your reply, sorry not having followed the rules, I run out of time, but I will do it now. I tried pasting your code but, again, the file was saved in the first window I had open on my desktop and in addition it reported in the file name the all path, like this : /localhost/Volumes/Amministrazione/Amministrazione/SchedeLavoriClienti/CAVATORTA/2010/CAV-PROVA.xls. Only CAV-PROVA.xls should be shown. The string C is correct but I don't understand when you says that the code doesn't make use of the directory variable I have created. Sorry I 'm very new to this sort of things. Thank you again. Marzia

  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: save as .xls from a cell value and in a specific location on Mac

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Hope that helps.

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

    Free DataBaseForm example

  5. #5
    Registered User
    Join Date
    07-28-2010
    Location
    Parma, Italy
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: save as .xls from a cell value and in a specific location on Mac

    Thank you JBeaucaire for your reply, sorry not having followed the rules, I run out of time, but I will do it now. I tried pasting your code but, again, the file was saved in the first window I had open on my desktop and in addition it reported in the FILE NAME the all path, like this:
    Please Login or Register  to view this content.

    Only CAV-PROVA.xls should be shown. The string C is correct but I don't understand when you says that the code doesn't make use of the directory variable I have created. Sorry I 'm very new to this sort of things. Thank you again. Marzia

  6. #6
    Registered User
    Join Date
    07-28-2010
    Location
    Parma, Italy
    MS-Off Ver
    Excel 2003
    Posts
    7

    Smile Re: save as .xls from a cell value and in a specific location on Mac

    Hi JBeaucaire, now I understood what you meant about making use in the code o the directory variable. Everywhere in the net I see the path concatenated with the file name, the same you have suggested to me, but on Mac that path come out within the file name ignoring it as a location of tthe saved new file. It may be a Mac problem, and I don't who to ask to. There is any apple script to do the same? I have also excel 2008 for Mac, which I should use instead of using the previous version beacuse of a vba makro. Thank you again. Marzia

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: save as .xls from a cell value and in a specific location on Mac

    Please EDIT your original post, GO ADVANCED, and add code tags to the code posted in that first thread. Thanks.

+ 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