Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7889939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:13:34+00:00 2026-06-03T06:13:34+00:00

I have a couple of problem with the code below. I am copying and

  • 0

I have a couple of problem with the code below. I am copying and pasting a chart from one file to another and then closing the file from which the chart came. Everything works fine when I step througth the code in the debugger, but when I use the button on the sheet to fire the procedure it gives me an error: The object could not be found.

I am also getting flicker during the procedure even though I am using Application.ScreenUpdating = False.

Can anyone help? Any help would be greatly appreciated!!!

Thanks

Application.ScreenUpdating = False

Windows("Overhead Display.xls").Activate
Sheets("CHART DISPLAY - FINISH").Activate
Application.DisplayFullScreen = True
ActiveSheet.ChartObjects("ChartImage").Activate
ActiveSheet.ChartObjects("ChartImage").Delete

ChDir _
    "C:\...FILES"
Workbooks.Open Filename:= _
    "C:\...BLACK.xls"
Sheets("RYG CHARTS").Visible = True
Sheets("RYG CHARTS").Activate
ActiveSheet.Unprotect Password:="052100F"
ActiveSheet.ChartObjects("Chart 5").Activate
ActiveChart.ChartArea.Select
ActiveChart.ChartArea.Copy
ActiveWindow.Visible = False
Windows("Overhead Display.xls").Activate
ActiveSheet.Paste
'Rename chart to delete later
ActiveChart.Parent.Name = "ChartImage"
ActiveSheet.ChartObjects("ChartImage").Activate
ActiveSheet.Shapes("ChartImage").Top = 100
ActiveSheet.Shapes("ChartImage").Width = 700
ActiveSheet.Shapes("ChartImage").Height = 375
ActiveSheet.Shapes("ChartImage").Left = 20


'ActiveWindow.Visible = False
Windows("Overhead Display.xls").Activate
Range("A1").Select
With ActiveWindow
    .DisplayGridlines = False
    .DisplayHeadings = False
    .DisplayHorizontalScrollBar = False
    .DisplayVerticalScrollBar = False
    .DisplayWorkbookTabs = False
End With



Windows("BMW F25 OUTERBELT BLACK.xls").Activate
Sheets("FILE SETUP").Activate
ActiveSheet.Unprotect Password:="052100AF"
Range("J2").Select
Selection.Copy
Windows("Overhead Display.xls").Activate
Sheets("CHART DISPLAY - FINISH").Activate
Range("K2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
Application.CutCopyMode = False

Windows("BMW F25 OUTERBELT BLACK.xls").Activate
Range("J3").Select
Selection.Copy
Windows("Overhead Display.xls").Activate
Sheets("CHART DISPLAY - FINISH").Activate
Range("J3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
Application.CutCopyMode = False

Windows("BMW F25 OUTERBELT BLACK.xls").Activate
Range("D2").Select
Selection.Copy
Windows("Overhead Display.xls").Activate
Sheets("CHART DISPLAY - FINISH").Activate
Range("L4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
Application.CutCopyMode = False

Windows("BMW F25 OUTERBELT BLACK.xls").Activate
Range("D3").Select
Selection.Copy
Windows("Overhead Display.xls").Activate
Sheets("CHART DISPLAY - FINISH").Activate
Range("N3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
Application.CutCopyMode = False

Windows("BMW F25 OUTERBELT BLACK.xls").Activate
Range("H13").Select
Selection.Copy
Windows("Overhead Display.xls").Activate
Sheets("CHART DISPLAY - FINISH").Activate
Range("U11").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
Application.CutCopyMode = False

Windows("BMW F25 OUTERBELT BLACK.xls").Activate
Range("F13").Select
Selection.Copy
Windows("Overhead Display.xls").Activate
Sheets("CHART DISPLAY - FINISH").Activate
Range("U13").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
Application.CutCopyMode = False

Windows("BMW F25 OUTERBELT BLACK.xls").Activate
Range("G13").Select
Selection.Copy
Windows("Overhead Display.xls").Activate
Sheets("CHART DISPLAY - FINISH").Activate
Range("U15").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
Application.CutCopyMode = False

Windows("BMW F25 OUTERBELT BLACK.xls").Activate
Sheets("RAW DATA LIST").Activate
ActiveSheet.Range("A2") = ""
Windows("BMW F25 OUTERBELT BLACK.xls").Activate

ActiveWorkbook.Close SaveChanges:=False

Windows("Overhead Display.xls").Activate
Sheets("CHART DISPLAY - FINISH").Activate
Range("A1").Select

Application.ScreenUpdating = True
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T06:13:35+00:00Added an answer on June 3, 2026 at 6:13 am

    UNTESTED

    Try this and tell me if you get any error?

    Option Explicit
    
    Sub Sample()
        Dim wbThis As Workbook, WbOther As Workbook
        Dim wsThis As Worksheet
    
        Application.ScreenUpdating = False
    
        Set wbThis = ThisWorkbook
        Set wsThis = wbThis.Sheets("CHART DISPLAY - FINISH")
    
        wsThis.ChartObjects("ChartImage").Delete
    
        '~~> Change the path as required
        Set WbOther = Workbooks.Open(Filename:="C:\...BLACK.xls")
    
        With WbOther.Sheets("RYG CHARTS")
            .Visible = True
            .Unprotect Password:="052100F"
            .ChartObjects("Chart 5").ChartArea.Copy
            wsThis.Activate
            ActiveSheet.Paste
        End With
    
        wbThis.Activate
        'Rename chart to delete later
        ActiveChart.Parent.Name = "ChartImage"
        ActiveSheet.ChartObjects("ChartImage").Activate
        ActiveSheet.Shapes("ChartImage").Top = 100
        ActiveSheet.Shapes("ChartImage").Width = 700
        ActiveSheet.Shapes("ChartImage").Height = 375
        ActiveSheet.Shapes("ChartImage").Left = 20
    
        With ActiveWindow
            .DisplayGridlines = False
            .DisplayHeadings = False
            .DisplayHorizontalScrollBar = False
            .DisplayVerticalScrollBar = False
            .DisplayWorkbookTabs = False
        End With
    
        With WbOther
            With .Sheets("FILE SETUP")
                '.Unprotect Password:="052100AF"
                wbThis.Range("K2").Value = .Range("J2").Value
                wbThis.Range("J3").Value = .Range("J3").Value
                wbThis.Range("L4").Value = .Range("D2").Value
                wbThis.Range("N3").Value = .Range("D3").Value
                wbThis.Range("U11").Value = .Range("H13").Value
                wbThis.Range("U13").Value = .Range("F13").Value
                wbThis.Range("U15").Value = .Range("G13").Value
            End With
    
            .Close SaveChanges:=False
        End With
    
        Application.ScreenUpdating = True
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's the problem: I have couple of pages which gets its content from a
I have a problem with my code posted below, set and get methods. I
I have written some code that pulls info from a plist file and does
Hi everyone my problem today is I have a couple of buttons that slide
We have a couple of mirrored SQL Server databases. My first problem - the
In my particular situation, I have a couple of solutions to my problem. I
I have faced this problem quite often during the last couple of months, during
I have been working for a couple of days on a problem with my
In a couple of scripts that I use I have problem that is intermittent.
We have a couple of sites which have some memory problems and fairly often

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.