+ Reply to Thread
Results 1 to 3 of 3

Copy workbook tab and macro changing for new tab

Hybrid View

  1. #1
    Registered User
    Join Date
    06-06-2012
    Location
    Yorkshire
    MS-Off Ver
    Excel 2010
    Posts
    25

    Copy workbook tab and macro changing for new tab

    Evening All,

    I currently have a workbook with a Tab called Cam 1, I can copy this tab and the Macros are copied as well but i would rename the copied tabs to Cam 2, Cam 3 etc.
    my question is can the macros alter / is there a line of code that can make it so the macro only changes the copied tab and not the original.

    Unfortunatley my workbook is to big to upload, however below is the code for my macro.

    Sub Ceiling()
    '
    ' J Macro
    '
    
    '
        Sheets("Ref").Select
        ActiveSheet.Shapes.Range(Array("Ceiling")).Select
        Selection.Copy
        Sheets("Cam 1").Select
        Range("L7:P16").Select
        ActiveSheet.Paste
        Selection.ShapeRange.IncrementLeft 0.75
        Range("Q5").Select
    End Sub
    Any help would be greatly appriciated.

    In addition is there a line of code i can put in so if there is already an image in the cell it will delete prior to inserting the new one.

    Many Thanks
    Last edited by Cutter; 09-04-2012 at 06:45 PM. Reason: Added code tags

  2. #2
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Copy workbook tab and macro changing for new tab

    @ MarcLewis

    Please notice that code tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at top of the page and read Rule #3.
    Thanks.

  3. #3
    Registered User
    Join Date
    06-06-2012
    Location
    Yorkshire
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Copy workbook tab and macro changing for new tab

    Appologies,
    i will in future apply code tags
    Cheers

+ 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