Thanks Thanks:  0
Likes Likes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: activating a different workbook without knowing its name.

  1. #1
    New Member
    Join Date
    Jun 2002
    Posts
    19
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy activating a different workbook without knowing its name.

    Hello there
    1. I have a file where I record a list of information.
    2. that information is copied, by a macro, from an XML file such as 6550010000305931007020640-procNfe.xml
    3. first I change it to .xls and open it, (or even without changing it) it opens as pasta1, pasta2.....

    Im trying to execute the macro that is on the permanent workbook. (I have for that macro a button on the excel menu) but clicking on it, gives a massage that the macro is not available on the that workbook (pasta1, pasta2.... name keep changing)

    I would like to know how do I get the macro to start without its workbook being active ?
    Or if I start with it, how do I tell excel to look for the other files ?

    Thanks
    Moty

  2. #2
    MrExcel MVP
    Moderator
    Andrew Poulsom's Avatar
    Join Date
    Jul 2002
    Posts
    73,092
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Default Re: activating a different workbook without knowing its name.

    What is "the permanent workbook" exactly? And how are you opening pasta1?
    Microsoft MVP - Excel

  3. #3
    New Member
    Join Date
    Jun 2002
    Posts
    19
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: activating a different workbook without knowing its name.

    by permanent I mean the file where I record the data, the name of it doesn't change.
    if I rename the 6550010000305931007020640-procNfe.xml to end with xls it will open as pasta1....

  4. #4
    MrExcel MVP
    Moderator
    Andrew Poulsom's Avatar
    Join Date
    Jul 2002
    Posts
    73,092
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Default Re: activating a different workbook without knowing its name.

    Yes, but how are you opening it? Is it in the same instance of Excel as the workbook that contains the macro that you want to run?
    Microsoft MVP - Excel

  5. #5
    New Member
    Join Date
    Jun 2002
    Posts
    19
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: activating a different workbook without knowing its name.

    through windows explorer, you think this may be the reason ?

  6. #6
    New Member
    Join Date
    Jun 2002
    Posts
    19
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: activating a different workbook without knowing its name.

    I tried to open within excel and got same result.

  7. #7
    MrExcel MVP
    Moderator
    Andrew Poulsom's Avatar
    Join Date
    Jul 2002
    Posts
    73,092
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Default Re: activating a different workbook without knowing its name.

    When you open it in Excel is your "permanent workbook" open?
    Microsoft MVP - Excel

  8. #8
    New Member
    Join Date
    Jun 2002
    Posts
    19
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: activating a different workbook without knowing its name.

    yes, I even tried copying the macro on PERSONAL.XLSX

  9. #9
    MrExcel MVP
    Moderator
    Andrew Poulsom's Avatar
    Join Date
    Jul 2002
    Posts
    73,092
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Default Re: activating a different workbook without knowing its name.

    How did you add the button to the menu and what macro is assigned to it?
    Microsoft MVP - Excel

  10. #10
    New Member
    Join Date
    Jun 2002
    Posts
    19
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: activating a different workbook without knowing its name.

    Macro was created as a user command, then I looked for that macro and added its button to the menu. same way you would add other available commands.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •