+ Reply to Thread
Results 1 to 17 of 17

macro save in two path different

  1. #1
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    macro save in two path different

    Hello everyone.
    as correcting the part of the macro < if-then >:

    Please Login or Register  to view this content.
    If Excel 2003 = sPath = "C:\Documents and Settings\" & username & "\Documenti\rapportini_ore_straordinarie" 'excel 2003

    if excel 2007 = sPath = "C:\Users\" & username & "\Documents\rapportini_ore_straordinarie" 'excel 2007

    I hope I was clear.
    max_max

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: macro save in two path different

    Please Login or Register  to view this content.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro save in two path different

    Thanks daffodil11.
    The selection is automatically according to the installed version?
    The modification must run on excel 2003 and 2007
    A greeting and thanks.
    max_max
    Last edited by max_max; 07-01-2016 at 02:36 PM.

  4. #4
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro save in two path different

    It works well, I entered the exact change.
    Thanks daffodil 11.
    max_max
    Last edited by max_max; 07-01-2016 at 02:54 PM.

  5. #5
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro save in two path different

    A curiosity.
    If the application.version was superior to excel 2007 (I do not have a chance to try) the modification work?
    max_max

  6. #6
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: macro save in two path different

    No, but we can accommodate that as well.

    Please Login or Register  to view this content.
    or you could just do a later or earlier than coercion

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro save in two path different


    Thank you so much daffobil11.
    A greeting.
    max_max
    ------------------------------------
    Ti ringrazio tantissimo daffobil11.
    Un saluto.
    max_max

  8. #8
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro save in two path different

    Hello can this change?

    Please Login or Register  to view this content.
    max_max
    Last edited by max_max; 07-02-2016 at 03:17 PM.

  9. #9
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: macro save in two path different

    Please Login or Register  to view this content.

  10. #10
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro save in two path different

    Thanks daffodil 11
    I think it's entirely accurate.
    I have to try the macro tomorrow morning.
    A greeting and thanks.
    max_max

  11. #11
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: macro save in two path different

    It was an interesting challenge! Glad to have helped.

  12. #12
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693
    Not work in window xp - excel 2003
    Work in Windows 7 - excel 2007
    max_max

  13. #13
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: macro save in two path different

    I will try harder!

  14. #14
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro save in two path different

    Hello daffodil 11
    After many tests I changed so:

    Please Login or Register  to view this content.
    and it is accurate or just a case of luck?
    max_max

  15. #15
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: macro save in two path different

    A little bit of both!

    I'm no VBA expert, I just know enough to be dangerous. Looks like you got it work just fine!

  16. #16
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro save in two path different

    The macros can be dangerous?

  17. #17
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: macro save in two path different

    I meant I know enough to do effective, yet basic tasks. I'm still terrible at many, many things in VBA.

    As a side note, VBA can be dangerous. THIS VBA macro is not dangerous. But even an antiquated programming language such as VBA can still do terrible, terrible things such as wipe computers, self-replicate, ie anything a normal computer virus does.

    This is why anytime you open a *.xlsm you do not recognize, you should first open it with macros disabled and examine the code and make sure none of the code is locked or hidden. Only allow macros to run on a unknown workbook when you are sure it poses no threat.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. macro save in path X
    By max_max in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-27-2016, 03:34 PM
  2. [SOLVED] Macro to save file to path automatically
    By pauldaddyadams in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-19-2015, 06:08 AM
  3. Macro to save as PDF to a changeable path
    By CRS111 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-22-2015, 02:51 PM
  4. Save using macro file path
    By RANDY LIPOSKY in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-22-2014, 11:10 AM
  5. [SOLVED] Macro to save xls to pdf with path & naming convention
    By graiggoriz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-01-2014, 11:24 AM
  6. how to specify a file save path to a save macro
    By Solidstan in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-04-2013, 05:33 PM
  7. [SOLVED] Macro to save as using path in worksheet
    By Shahid_Excel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-03-2012, 08:16 AM

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