+ Reply to Thread
Results 1 to 6 of 6

Macro doesn't work when workbook is renamed

Hybrid View

  1. #1
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Macro doesn't work when workbook is renamed

    Please use code tags around your code as it makes it easier to read.

    I am thinking that the code is in a workbook named TEST - QUOTE SHEET.xlsm. If so, change all the lines with:

    Windows("TEST - QUOTE SHEET.xlsm").Activate
    to

    ThisWorkbook.Activate
    Now having said that, this code should be cleaned up. You don't need to activate workbooks back and forth. If this is of interest to you, then you can start a new thread asking for help on cleaning up the code and making it more efficient.
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  2. #2
    Registered User
    Join Date
    07-28-2009
    Location
    Wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Macro doesn't work when workbook is renamed

    Thank you, I will make the change and see if that corrects my problem. I'm sorry, but I don't know what code tags are. I am self taught and know just enough to be dangerous. I appreciate your help and I will submit another thread to clean up the code. Thanks a million.

+ 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