Results 1 to 3 of 3

Thread: [RESOLVED] How do I reference changes to be made in a copied workbook

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    21

    [RESOLVED] How do I reference changes to be made in a copied workbook

    I coud not find the cause of an Automation Error. The only thing I know is that, if the workbook that I copy, does not have any charts (objects) within, it does not create the error. So, I create the charts after the workbook copy, but I want also modify font and borders to the new workbook, the problem is that the modifications were done in the original workbook. Take a look:

    Worksheets.Copy

    With Sheets("DTC Search Result").ChartObjects.Add(29, 1120, iDTCX * 66, 250).Chart

    Here I have instructions of the new chart. This chart was correctly created in the new cloned workbook!.

    End With
    sheDTC.Range(sheDTC.Cells(83, 2), sheDTC.Cells(84, iDTCX - 1)).Borders.LineStyle = xlContinuous
    sheDTC.Range(sheDTC.Cells(83, 3), sheDTC.Cells(83, iDTCX - 1)).Font.Bold = True
    sheDTC.Range(sheDTC.Cells(83, 2), sheDTC.Cells(83, iDTCX - 1)).Font.ColorIndex = 2
    sheDTC.Range(sheDTC.Cells(83, 2), sheDTC.Cells(83, iDTCX - 1)).Interior.ColorIndex = 49

    This last modifications was not maden in the new workbook (what I want), instead, they were done in the old-original workbook.

    How do I reference to the new workbook?

    Thanks!.
    Last edited by yorch; Jan 31st, 2006 at 05:28 PM. Reason: RESOLVED

Posting Permissions

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



Click Here to Expand Forum to Full Width