+ Reply to Thread
Results 1 to 12 of 12

Macro to Select Certain Tab

  1. #1
    Registered User
    Join Date
    03-16-2014
    Location
    Oshkosh, WI
    MS-Off Ver
    Excel 2007
    Posts
    52

    Macro to Select Certain Tab

    This is probably something super easy, but I'm not a macro guy, so help is much appreciated. I have a macro I created that is taking certain sections of a table and pasting them into another workbook. However, right now I can only get the macro to paste into the active sheet of the other workbook. I want my selected cells to be pasted to a specific sheet with the name "Budget". The same with going back to my original workbook I want to make sure it is taking the selection from sheet name "BudgetExport" My macro code is below.


    Please Login or Register  to view this content.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Macro to Select Certain Tab

    Hi,

    Maybe

    Please Login or Register  to view this content.
    It was a little difficult to understand precisely what you want to do in any circumstance since your code was presumably put together by the macro recorder and hence only recorded stuff that happened to be relevant at that time. If you need further advice then upload the workbook and tell us what you want to do, rather than what the macro recorder did.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    03-16-2014
    Location
    Oshkosh, WI
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: Macro to Select Certain Tab

    Ok here are the workbooks. I'm hoping that by hitting Ctrl+Shift+X to copy Cells D5:O21 & D24:O88 from "Budget Export" Tab in "Budget Creator" workbook to the same cells in "BBudget" Tab in "Budget Updated" workbook (Paste Values). Enjoy my lovely spreadsheets I started by being bored this winter.
    Thanks for the help.
    Attached Files Attached Files

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Macro to Select Certain Tab

    Hi,

    Sorrty small typo earlier

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-16-2014
    Location
    Oshkosh, WI
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: Macro to Select Certain Tab

    Sorry, for the delay in reply, but tried this code today and it didn't work. Any ideas?

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Macro to Select Certain Tab

    Just checked again and it works OK for me.

    You'll need to tell me what you mean by 'it didn't work'. Did the macro run but not do anything, did it run but not copy and paste the right data, did it not run at all and debug with an error? If the latter on which line did it halt.

    Have you put this code in the Budget Creator workbook in place of your existing code.

    If so upload the workbooks again with the new code I gave you.

  7. #7
    Registered User
    Join Date
    03-16-2014
    Location
    Oshkosh, WI
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: Macro to Select Certain Tab

    Ok here are the fresh copies, I just get a ding sound when I press ctrl+shift+x. Nothing else happens. Everything looks like it should work I don't question you there. I'm just probably doing something simple wrong.
    Attached Files Attached Files

  8. #8
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Macro to Select Certain Tab

    Try deleting the last line
    Range("R8").Select

  9. #9
    Registered User
    Join Date
    03-16-2014
    Location
    Oshkosh, WI
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: Macro to Select Certain Tab

    No luck, are you able to get it to run when you open up the two workbooks?

  10. #10
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Macro to Select Certain Tab

    Quote Originally Posted by BLS99covert View Post
    No luck, are you able to get it to run when you open up the two workbooks?
    I believe that was the case when I last tried it. I don't have Excel access at the moment so can't reconfirm.

  11. #11
    Registered User
    Join Date
    03-16-2014
    Location
    Oshkosh, WI
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: Macro to Select Certain Tab

    If you could check again when you do have access again that would be great. I still can't get it to do much of anything at all.

  12. #12
    Registered User
    Join Date
    03-16-2014
    Location
    Oshkosh, WI
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: Macro to Select Certain Tab

    I was able to get it to go, I was pasting the code into "View Code" on sheet tabs versus pasting it in the Recorded Macro edit screen.
    Thanks for all your help.

+ 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. macro to select free cell at end of row and run another macro.
    By wynn1964 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-25-2014, 01:05 PM
  2. Stop Macro, Select Cell, Restart Macro
    By tenk283 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-26-2010, 12:48 AM
  3. Pause macro, select file, continue macro
    By DamienC in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-18-2008, 07:18 AM
  4. Macro to select certain sheets then perform part of other macro on them only
    By raehippychick in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-05-2007, 10:12 AM
  5. [SOLVED] Select a macro button with a macro
    By Spike in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-20-2006, 07:35 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