+ Reply to Thread
Results 1 to 5 of 5

how to make macro file/workbook independant?

  1. #1
    Registered User
    Join Date
    08-09-2008
    Location
    San Jose
    Posts
    6

    how to make macro file/workbook independant?

    Hi All, I'm sure this is a simple one for your veterans....I'm just getting started with Excel macros. Below is a macro definition. I created this macro (Sort1) while inside a file named "FileA".

    I'm trying to make it so that this macro can be used inside any Excel file that I happen to be in. I have created/stored the excel macro in my Personal folder that is viewable to all other Excel files. The problem I'm having is that the macro below gets created with a hard-coded file name ("FileA"). How do I modify this macro so that it works on the "current file" (any Excel file that I happen to be in).

    Your help is greatly appreciated!
    Thanks,
    Chris



    Please Login or Register  to view this content.
    Last edited by Chris95120; 08-12-2008 at 02:28 AM. Reason: trying to follow posting rules...still learning...

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Please read the Forum Rules about thread titles, and then edit yours to be descriptive of your problem, and then edit your post to wrap your code with Code Tags.

  3. #3
    Registered User
    Join Date
    08-09-2008
    Location
    San Jose
    Posts
    6

    Will do....sorry, learning the ropes here

    ...thanks for your patience!

    -Chris

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Thanks.

    Try changing
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-09-2008
    Location
    San Jose
    Posts
    6

    Thanks!!!

    That did the trick!

    Good karma headed your way....

    -Chris

+ 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