+ Reply to Thread
Results 1 to 2 of 2

Macro not working with new personal.xls file

  1. #1
    Registered User
    Join Date
    07-06-2011
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    7

    Macro not working with new personal.xls file

    As background, this macro (which I got from this forum) works just fine in my personal.xls macro list. However, I was trying to pass it along to someone else and at some point they had deleted their personal.xls file. So, I went through the process of

    creating a workbook called personal.xls
    dropping it in their XLSTART folder
    hiding the workbook and saving it

    Everything seems to be fine. Their EXCEL now opens with the typical default workbook and I can see the personal.xls in the VBA explorer.

    However, this macro doesn't work for them if it is saved into the personal.xls workbook. It is supposed to take the active workbook and look at the items in a list and create a separate tab for each of the unique values. Stepping through it

    it finds a unique value list (in this case from column one)
    Creates a tab called UniqueList
    Creates all the necessary tabs and copies the appropriate info
    Deletes the UniqueList tab

    Let's say that the workbook we want to modify is called TEST. The problem seems to be that it keeps making the personal.xls file the active workbook at some point. So, when the macro runs, it will find the unique values on TEST workbook, but create the UniqueList tab in the personal.xls workbook (with the unique values from the TEST workbook). And then error out.

    Here is the code

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    07-06-2011
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Macro not working with new personal.xls file

    Nevermind... I am an idiot. Upon further review, I pasted the macro into the personal.xls "ThisWorkbook" rather than into a Module. Once I moved it, the macro worked fine. Sorry for the stupid question.

+ 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