Doing copy/paste operations in VBA without using the 'real' windows clipboard?

relaxok

New Member
Joined
Apr 14, 2009
Messages
29
Hi all -

I run VBA macros all the time that take 20-30 minutes in some cases - I generally run them on a secondary machine, not my primary machine. However one issue I've had is that since newer 'remote' solutions like the windows 10 version of Remote Desktop and VMWare Horizon/Blast share the clipboard (very useful in many cases) of the target OS, it has side effects. Any VBA running on my secondary machine, if I have the Remote Desktop client or VMWare client open, even if it's minimized, when the VBA does a 'copy' clipboard command, I find myself pasting gibberish on the main machine, not realizing a scheduled VBA task ran on the other machine. Or even when you ignore the 'other machine' clipboard issue, it means I can't really run VBA that uses the clipboard on the main machine itself without possibly messing up my copy/paste operations I'm doing elsewhere.

So I guess my question is, is there a way to use the functionality of Cut/Copy/Paste in VBA but using an 'internal' clipboard that doesn't affect other applications or the OS?

Thanks!
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Set your cell values without copying?
VBA Code:
Range("B1").Value = Range("A1").Value
 
Upvote 0
I'm not sure I can convert all this complex stuff like selecting ranges of rows to .Cut and then .Insert-ing them elsewhere,


For a range...

VBA Code:
Sub ResizeValues()
With Range("A1:B10")
  Range("Z1").Resize(.Rows.Count, .Columns.Count).Value = .Value
End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,159
Members
453,021
Latest member
Justyna P

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