why copy and paste doesn't work if macro is running?

earp_

Active Member
Joined
Apr 30, 2008
Messages
305
Hi, I have my macro that every second does a copy and paste.
but window doesn't copy and paste anything else but the macro's value :(
is it normal?
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
for some strange reason this doesn't work always...
If (myColCheck > 11) Then
Worksheets("Sheet3").Range("F" & myColCheck & ":" & "N" & myColCheck).FormulaR1C1 = Worksheets("Sheet3").Range("F11:N11").FormulaR1C1
end if
(myColCheck is greater than 11)
 
Upvote 0
It what way does it not work? What does it do instead?
 
Upvote 0
Are you sure that myColCheck is always greater than 11?

You should try to work out under what conditions this fails, and what is different compared to when it works.
 
Upvote 0
Hi, I found when that doesn't work: it doesn't when I'm watching a chart Sheet
Worksheets("Sheet2").Range("F" & myColCheck & ":" & "N" & myColCheck).FormulaR1C1 = Worksheets("Sheet2").Range("F11:N11").FormulaR1C1
myColCheck and integer and it is the actual row.
So with this code I create a chart, if i'm on the sheet where the code is made, everything is perfect.
Once i'm on the chart sheet the code doesn't work.
What it could be the reason?
my code has this structure:
With ThisWorkbook
....
....
With Worksheets("Sheet1")
...
Worksheets("Sheet2").Range("F" & myColCheck & ":" & "N" & myColCheck).FormulaR1C1 = Worksheets("Sheet2").Range("F11:N11").FormulaR1C1
End With
..
End With
 
Upvote 0
Please explain what you mean by "Chart Sheet"? In Excel a chart sheet is an object that is a sheet that just contains a chart ... no rows and no columns. Is that what you've created?
 
Upvote 0
yep... i have a sheet which contains a chart and that chart gets the values from Sheet2.
If i'm on sheet2 i have no problem and everything work correctly.
Instead if i'm on the chart sheet the code when is called doesn't work.
Worksheets("Sheet2").Range("F" & myColCheck & ":" & "N" & myColCheck).FormulaR1C1 = Worksheets("Sheet2").Range("F11:N11").FormulaR1C1
 
Upvote 0

Forum statistics

Threads
1,215,518
Messages
6,125,291
Members
449,218
Latest member
Excel Master

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