Tomasz Kuryło
Tomasz Kuryło

Reputation: 122

Excel VBA - Paste from clipboard

I'm trying to build a macro that looks like this:

Sub CopyAsValues()
Selection.PasteSpecial xlPasteValues
End Sub

It seems to me that Excel requires from me to add a copy line, e.g.:

Range("C1:C5").Copy"

But I don't want to. I want to manually copy from cells, and then use the macro to paste as values. How can I do that?

Upvotes: 1

Views: 2712

Answers (1)

Vasily
Vasily

Reputation: 5782

You do not need macro for this, comfortable way to paste only values, I guess, will be using quick access toolbar as in picture below

Excel Option ~~> Customize ~~> Choose commands from [All Commands] ~~> Select "Paste Values" command and add to toolbar

enter image description here

so you will receive button in top of the excel window with required option

enter image description here

then you can copy and paste only values using this button

Upvotes: 3

Related Questions