+ Reply to Thread
Results 1 to 11 of 11

Problem with Macro when saved to Personal workbook

  1. #1
    Registered User
    Join Date
    06-01-2020
    Location
    Nashville, TN
    MS-Off Ver
    Office365
    Posts
    9

    Problem with Macro when saved to Personal workbook

    I have the below macro to split workbooks. I cannot credit where I got it because I do not remember. It is a great macro with one exception, I have to set it up in each workbook where I want to use it. If I save it to the PERSONAL workbook so I can use it on multiple workbooks, it bombs out. I do not know VBA (although I want to learn it). Does anyone know what tweak I need to make to it in order to save it to the PERSONAL workbook and have it work whenever I want to use it?

    Thank you in advance for any assistance you can provide.

    Please Login or Register  to view this content.
    Last edited by AliGW; 07-27-2023 at 04:28 PM. Reason: Code tags added - please review the forum rules.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Problem with Macro when saved to Personal workbook

    You don't say where, or how, it bombs out. Hazard a guess ...

    Try changing
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    06-01-2020
    Location
    Nashville, TN
    MS-Off Ver
    Office365
    Posts
    9

    Re: Problem with Macro when saved to Personal workbook

    Thank you. I will try this. It was pointed out to me I never responded. It is because when I went to try this, I was having a problem finding the post. Sorry for such a late response.

  4. #4
    Registered User
    Join Date
    06-01-2020
    Location
    Nashville, TN
    MS-Off Ver
    Office365
    Posts
    9

    Re: Problem with Macro when saved to Personal workbook

    I have not had to use this macro for quite awhile (2020? Really?) but I do have a use for it once again. My original instructions say to use ALT+F11>This workbook. So I was going to try your suggestion today but I do not see an "active workbook" option. If I just change it in the code, is it going to save it to the Personal workbook where macro's are housed? Should I create the macro directly in the Personal workbook and then change the code? Thank you for your help!

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Problem with Macro when saved to Personal workbook

    The changes in the code have nothing to do with where the code is created/saved.

  6. #6
    Registered User
    Join Date
    06-01-2020
    Location
    Nashville, TN
    MS-Off Ver
    Office365
    Posts
    9

    Re: Problem with Macro when saved to Personal workbook

    Okay, it didn't seem like it would but I am not that familiar with coding. So where to I find "active workbook" instead of "this workbook"? I do not see it in the box labeled project - VBAProject which is where I find "this workbook".

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,778

    Re: Problem with Macro when saved to Personal workbook

    Please review the forum rules regarding code tags.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Problem with Macro when saved to Personal workbook

    Quote Originally Posted by Leah Jonas View Post
    Okay, it didn't seem like it would but I am not that familiar with coding. So where to I find "active workbook" instead of "this workbook"? I do not see it in the box labeled project - VBAProject which is where I find "this workbook".
    Please re-read post #2 and compare what is written there with your actual code as listed in post #1.

    Find the first line of code. Change it to the second line of code. Save it. See if it works. I never use Personal Workbooks so I can't test it.

  9. #9
    Registered User
    Join Date
    06-01-2020
    Location
    Nashville, TN
    MS-Off Ver
    Office365
    Posts
    9

    Re: Problem with Macro when saved to Personal workbook

    Hello Ali,
    I sense I did something I'm not supposed to but I'm not sure what it is. I guess it has something to do with code tags but I don't know what a code tag is. Whatever I did wrong, please explain in dummy terms so I know I never mean to break the rules so if/when I do it is completely unintended.

  10. #10
    Registered User
    Join Date
    06-01-2020
    Location
    Nashville, TN
    MS-Off Ver
    Office365
    Posts
    9

    Re: Problem with Macro when saved to Personal workbook

    Thank you! Changing to ActiveWorkbook in and of itself did not work, but, under Project-VBAproject when I selected Personal Workbook and made the change to ActiveWorkbook it did work. Thank you so much for your assistance. I would never gotten it on my own.

  11. #11
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Problem with Macro when saved to Personal workbook

    You're welcome.




    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. [SOLVED] Macro code for Current Workbook vs Personal Workbook
    By wdyl121 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-10-2020, 08:56 AM
  2. [SOLVED] Block from workbook saving from personal workbook macro
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 02-17-2019, 05:57 AM
  3. Workbook problem! Saved Macro in worksheet but not changes to document
    By dennymiller77 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-28-2018, 12:30 PM
  4. Problem with saving macro to personal macro workbook
    By JaguerRhye in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-09-2016, 03:43 AM
  5. personal macro workbook "READ ONLY" problem, cant remove.
    By Hongos in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-21-2014, 12:28 PM
  6. What Are Your Favourite Macros Saved to Your Personal Workbook?
    By JungleJme in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-29-2013, 06:04 AM
  7. Personal macro workbook and personal.xls
    By John Kilkenny in forum Excel General
    Replies: 1
    Last Post: 06-14-2005, 05:05 PM

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