If CutCopyMode = True coding

Will S

Board Regular
Joined
Oct 29, 2013
Messages
69
I'm experiencing an issue as to where I've got a SelectionChange macro set up, I can't change cells while keeping a range in CutCopyMode (I assumed this was because that code enters formula in cells, but even when it doesn't, it still cancels CutCopy). Can anyone think of a way to solve this?

I was trying:

Code:
IF Application.CutCopyMode = True then 
Dim CopyRange as Range
CopyRange = ActiveCell 'Could I maybe use something like Selection.Range?

'Rest of my Code

CopyRange.Copy
End if

I have no idea if this idea is possible all I know is my test didn't work, could someone give me advice on this?

Best regards,
~Will S
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
You need something like:
Code:
IF Application.CutCopyMode = xlCopy or Application.CutCopyMode = xlCut then
 
Upvote 0
That's working great and I think you've won the prize for for a quickest response I've seen on here.

The only thing I'm struggling with now (Was pretty sure I was going to hit this issue) is, it's taking the cell you're selecting as the CopyRange. Can you think of a way to have it copy the cell range you were on before the change? I imagine it will require BeforeRightClick but I don't know what the code would be for it to enter the current selection into a cell and then it could be a simple thing to just use that cell to select and copy the previous selection.

I don't suppose you know the answer to this as well?

Kind regards,
~Will S
 
Upvote 0

Forum statistics

Threads
1,223,905
Messages
6,175,297
Members
452,633
Latest member
DougMo

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