Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

pasting vba

ResolvedVersion 2003

Carey has attended:
Excel VBA Intro Intermediate course
Excel VBA Advanced course

Pasting in VBA

Why can you only pastespecial when writing code

RE: pasting in VBA

Hi Carey

PasteSpecial is a method of the Range object and is just one of the ways of pasting data into a workbook.

Although the Range method does not allow the Paste method, the Sheet method does which means as an alternative to using PasteSpecial is to use the code below:

Sub CopyPaste()

Range("A1:A20").Cut
Range("B1:B20").Select
ActiveSheet.Paste

End Sub

Hope this helps

Carlos

Mon 23 Mar 2009: Automatically marked as resolved.

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Adjusting the Elevation and Rotation in a 3-D Chart

For any 3-D chart you create, you can adjust the chart

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.12 secs.