Closed Thread
Results 1 to 6 of 6

Macro to work on any computer

  1. #1
    Forum Contributor
    Join Date
    04-02-2012
    Location
    Bergen, Norway
    MS-Off Ver
    MS 365 Subscription
    Posts
    323

    Macro to work on any computer

    Hi,

    I`m about to create a program to generate invoices, but need some help to modify a code to make it work in any computer.

    This is the code i`m using now:

    HTML Code: 
    This code as I can read it, will only be able to save the PDF in my computer.
    I hope somebody have a god idea that will help me solve this problem.

    Best regards
    喕stein Breivik

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,718

    Re: Macro to work on any computer

    The expression

    Application.DefaultFilePath

    will return the default file path on a Windows computer. On your machine it's probably

    "C:\Users\喕stein Breivik\Documents"

    Your current code has a path that may not exist on another computer. Where do you want the file to be saved when it's someone else's computer? Do you want to create a folder if it doesn't already exist?

    I do not know what the equivalent is on a Mac--do you also need to consider Macs?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Macro to work on any computer

    Kind of a duplicate thread, didn't get back to the original as I'm afraid the OP didn't make it clear exactly what was needed to have the code work on 'any' computer.
    If posting code please use code tags, see here.

  4. #4
    Forum Contributor
    Join Date
    04-02-2012
    Location
    Bergen, Norway
    MS-Off Ver
    MS 365 Subscription
    Posts
    323

    Re: Macro to work on any computer

    Thanks for youre reply 6stringjazzer

    I dont need to consider Macs. If you could help me to make the file be saved in the download folder would be great. Than the user will to be able to save it somewhere els manually later.

    Regards
    喕stein

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,718

    Re: Macro to work on any computer

    I get this:

    Please Login or Register  to view this content.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,635

    Re: Macro to work on any computer

    Unfortunately this is a duplicate thread and as such will now be closed. You may continue in your other thread: https://www.excelforum.com/excel-pro...-computer.html

    Thread closed.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Macro to work on any computer
    By Oeysbrei in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-13-2017, 07:26 PM
  2. Macro should not work any other computer
    By janagan in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 07-21-2015, 05:52 AM
  3. Macro does not work on different computer
    By kaffein in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-29-2015, 03:46 PM
  4. Macro does not work when file is sent to another computer
    By brdstyle in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-25-2013, 01:51 AM
  5. why this macro doesn't work in my boss computer!?
    By matador_24 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-22-2011, 12:35 PM
  6. Macro won't work on another networked computer
    By n0v1c3 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-15-2010, 02:35 AM
  7. Auto Filter on my home computer differs from my work computer.
    By Sbova0226 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 07-08-2009, 03:04 PM

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