Can a Chart update as a running macro updates cells?

JeffFinnan

New Member
Joined
Aug 12, 2020
Messages
47
Office Version
  1. 2019
Platform
  1. Windows
I would like to be able to run a macro that updates some cells such that as each cell is updated a chart is updated too. Presently the chart does not update until the macro has completed. Here is code I am using. I put in the delay to allow for the chart to update or at least that was my thinking.

VBA Code:
Sub CopyPasteDate()
'
' CopyPasteDate Macro

    Range("BF6").Select
    Selection.Copy
     
    For i = 7 To 40
      Range("BF" & i).PasteSpecial Paste:=xlPasteFormulas
      Application.Wait (Now + TimeValue("0:00:02"))
    Next i

  Application.CutCopyMode = False
   
   
End Sub

Is there way to achieve what I would like to do?

Thanks,
Jeff
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
After much playing around I had to revamp. I got this code to work for me. It is slow enough that I did not need to add any wait time.

VBA Code:
Sub beachDistDynamic()
'
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic

    j = 2
    For i = 4 To 30
        Worksheets("GTM Data  2022").Range("BF" & i).Formula = "=ActivityReport!$H" & j
        Sheets("Beach Dist 2022").Activate
        j = j + 1
        DoEvents
    Next i
    
End Sub

If there is a better way, let me know.
 
Upvote 0
Solution

Forum statistics

Threads
1,215,039
Messages
6,122,802
Members
449,095
Latest member
m_smith_solihull

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top