copy selection value and paste in other application

seba64

New Member
Joined
Apr 24, 2016
Messages
32
Hi, i have a column with values, i copy each value, one on one with selection.copy, and i need go to the other app with alt tab and paste the value with ctrl v.

I try:
VBA Code:
selection.copy
Application.SendKeys ("%{TAB}^v"), True

but that don't work

VBA Code:
 Application.SendKeys ("%{TAB}"), True
 Application.SendKeys ("^v"), True

its tries only do the alt + Tab but not the CTRL + V

How can paste the value in other application?
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Hi, i have a column with values, i copy each value, one on one with selection.copy, and i need go to the other app with alt tab and paste the value with ctrl v.

I try:
VBA Code:
selection.copy
Application.SendKeys ("%{TAB}^v"), True

but that don't work

VBA Code:
 Application.SendKeys ("%{TAB}"), True
 Application.SendKeys ("^v"), True

its tries only do the alt + Tab but not the CTRL + V

How can paste the value in other application?

method 1, the equivalent of ctrl-c + ctrl-v, copies formatting.
selection.copy Destination:=ThisWorkbook.Sheets("Sheet2").Range("A1:A5")

method 2, the preferred way to copy and paste values only.
selection.copy
ThisWorkbook.Sheets("Sheet2").Range("A1:A5).PasteSpecial Paste:=xlPasteValues

note:
I would replace "selection" with a specific range of cells in most cases.
ThisWorkbook.Sheets("Sheet2").Range("A1:A5").copy

Copy range directly (fastest) vRangeToCopy = ws1.Range("A1:A3")

ws2.Range("B1:B3").Value2 = vRangeToCopy
Copy range (without clipboard, faster) Set rng = Worksheets("Sheet1").Range("A1:Z100")
Worksheets("Sheet2").Range("A1").Resize(rng.Rows.Count, rng.Columns.Count).Cells.Value = rng.Cells.Value
Copy range using clipboard Range.Copy method (Excel)
Range(“A1:B3”).Copy Range(“D1”)
.Range("F5").Copy Destination:=.Range("A1:A5")
Paste special Range.PasteSpecial method (Excel)
Range(“A1:B3”).Copy
Range("B1").PasteSpecial Paste:=xlPasteValues
Paste:=xlPasteFormats
 
Upvote 0

Forum statistics

Threads
1,215,641
Messages
6,125,981
Members
449,276
Latest member
surendra75

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