+ Reply to Thread
Results 1 to 5 of 5

Stop macro looking at personal book when not told to

  1. #1
    Registered User
    Join Date
    01-27-2012
    Location
    Durham
    MS-Off Ver
    Excel 2003
    Posts
    61

    Stop macro looking at personal book when not told to

    Hi

    I have a macro that emails individual tabs to the address states in each tabs' A1 cell

    Please Login or Register  to view this content.
    The issue I have is that I want to use this macro from my personal workbook. But when I try, the macro looks for the email address in A1 of my personal macro book, rather than the workbook I want to send out. The code doesnt say 'look at my personal macro book', but as it is constantly creating new temp files im not sure where to start. How can I stop the macro looking at my personal book?

    Thank You
    Last edited by cooket4; 02-03-2012 at 10:51 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Stop macro looking at personal book when not told to

    Thisworkbook refers to the workbook that contains the code, you need activeworkbook instead
    Hope that helps.

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

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    01-27-2012
    Location
    Durham
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: Stop macro looking at personal book when not told to

    wow sounds so simple! so if i change every 'thisworkbook' to 'activeworkbook' it should work?

  4. #4
    Registered User
    Join Date
    01-27-2012
    Location
    Durham
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: Stop macro looking at personal book when not told to

    works like a charm!! thank you

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Stop macro looking at personal book when not told to

    No problem

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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