+ Reply to Thread
Results 1 to 5 of 5

Personal.XLSB macro pasting into Personal.XLSB

  1. #1
    Registered User
    Join Date
    08-27-2013
    Location
    UK
    MS-Off Ver
    Excel 20010
    Posts
    25

    Personal.XLSB macro pasting into Personal.XLSB

    I have a worksheet that I need to perform some copy and paste operations on when it's opened, which I do with a macro in PERSONAL.XLSB. It's a really long and messy macro, but the critical part of it is this, as far as I can tell:

    Please Login or Register  to view this content.
    Which is for some reason pasting into PERSONAL.XLSB. I tried getting rid of the "Sheet1" in PERSONAL.XLSB but that just caused an error. Is there a better way of pointing Excel at the spreadsheet I want?
    Last edited by davepoth; 07-11-2015 at 07:40 PM.

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Personal.XLSB macro pasting into Personal.XLSB

    I'm not an expert by any means, but, I THINK it either because the workbook isn't being named so it's pasting into the workbook that the macro is in. OR, it's the ActiveSheet.Paste line, which will paste into the workbook that is open and active on the screen.
    Again, I could be wayyyyyyy wrong on this, so if I am, my apologies in advance.
    Edit* If anyone sees this and knows/thinks I am incorrect, PLEASE do not hesitate to correct me [tactfully I hope]
    Last edited by gmr4evr1; 07-07-2015 at 04:53 PM. Reason: added Edit*
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  3. #3
    Registered User
    Join Date
    08-27-2013
    Location
    UK
    MS-Off Ver
    Excel 20010
    Posts
    25

    Re: Personal.XLSB macro pasting into Personal.XLSB

    I tried it with .activate as well as .select, but both ways it continued to paste into PERSONAL.XLSB. I'm a bit stuck.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs
    MS-Off Ver
    MS Office 2019
    Posts
    18,226

    Re: Personal.XLSB macro pasting into Personal.XLSB

    All that code can be replaced with the following single line

    Please Login or Register  to view this content.
    Try this

  5. #5
    Registered User
    Join Date
    08-27-2013
    Location
    UK
    MS-Off Ver
    Excel 20010
    Posts
    25

    Re: Personal.XLSB macro pasting into Personal.XLSB

    That was just the job, and helped with all of the other trouble I was having with it too - saved a lot of questions!

+ 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. Running a Personal.XLSB Macro From Within Another Personal.XLSB Macro
    By js0873 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 06-23-2015, 09:58 AM
  2. Replies: 0
    Last Post: 01-15-2015, 05:53 AM
  3. [SOLVED] How to save a macro in the personal.xlsb folder
    By ajan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-07-2015, 02:55 PM
  4. cannot run macro if personal.xlsb is hidden
    By illusionek in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-07-2014, 08:16 AM
  5. Replies: 0
    Last Post: 05-10-2012, 09:22 AM

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