+ Reply to Thread
Results 1 to 3 of 3

Recorded Macro is picking up specfic directory information. Need it more generic

  1. #1
    Registered User
    Join Date
    01-16-2013
    Location
    Oakland, CA
    MS-Off Ver
    Excel 2010
    Posts
    22

    Question Recorded Macro is picking up specfic directory information. Need it more generic

    Hi,

    I don't know how to write Macro's, only record them. That's my first mistake.

    Anyway, I have an Excel Document which has multiple tabs. One of the tabs reads information from other tabs. I have a recorded macro moves this tab into a new workbook. At that point, one of the steps I need to do is break the link to the existing workbook. Data > Edit Links > Break link.

    The way the macro records when I do this is:

    Please Login or Register  to view this content.
    There will only ever be one Excel File this new workbook is linked to, so I need to break the link of any link found. Can I make the above macro more generic, so it will work for any user and from any directory the workbook is saved?

    Thanks!
    Last edited by alansidman; 10-30-2013 at 05:50 PM. Reason: code tags added per rule 3

  2. #2
    Forum Contributor
    Join Date
    09-30-2013
    Location
    Toronto, ON
    MS-Off Ver
    Excel 2007
    Posts
    229

    Re: Recorded Macro is picking up specfic directory information. Need it more generic

    You can get the path for the active workbook with the following. Will that help you?
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-16-2013
    Location
    Oakland, CA
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: Recorded Macro is picking up specfic directory information. Need it more generic

    I don't know it's the active workbook that is the problem. In Data > Links, the active workbook is reading from the original workbook. It displays the path of the original workbook in the link section of the new workbook. I just need a macro that will break the link to any workbook found, so it automatically converts all formulas reading between the two workbooks into values, so the new document becomes a stand alone document.

+ 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 to re-name a file to yesterday date in a specfic directory
    By kbriaz in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-13-2013, 05:03 AM
  2. [SOLVED] Recorded Pivot Table Macro Doesn't Do What I Recorded!
    By diakonos1984 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-26-2013, 11:01 AM
  3. [SOLVED] Macro to browse for an excel file in a specfic directory
    By lsteinbach in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-27-2012, 12:45 PM
  4. VBA autofilter not picking up the correct wanted information
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-30-2011, 12:24 PM
  5. Recorded Macro Missing All Useful Information
    By SRuiter in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-26-2010, 01:00 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