Reputation: 13
I am fairly new to VBA. I have created a resource that copies from a single cell and creates a string of n number of results. At the same time it creates a graph to the right of the results. When the results go below the view of the page, the sheet jumps back and forth and the graph follows. Is there a way using VBA to keep the entire sheet still (not visibly refreshing) whilst having the graph refresh for each result? Anyone's help is much appreciated.
Upvotes: 1
Views: 65
Reputation: 34045
There is no need to select anything there:
For a = 1 To Range("n").Value
'Copying Crossed to Results
Range("D18").Copy
Cells(a + 16, 2).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
' Creates Needle Drop Graph
'Delete Old Chart
On Error Resume Next
ActiveSheet.ChartObjects("PinDrop").Delete
On Error Goto 0
'Create Chart
With ActiveSheet.Shapes.AddChart.Chart
.ChartType = xlXYScatter
.Parent.Name = "PinDrop"
end with
Upvotes: 1