pasting vba
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Pasting in VBA

Pasting in VBA

resolvedResolved · Low Priority · Version 2003

replyReply Thu 12 Mar 2009, 16:39Delegate Carey said...

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

Pasting in VBA

Why can you only pastespecial when writing code

For upcoming training course dates see: Pricing & availability

replyReply Mon 16 Mar 2009, 15:10Trainer Carlos said...

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.

 

Please browse our web site to find out more about
excel training program and other Microsoft training courses.

Excel tip:

Number format shortcut

Ctrl+Shift+! applies the Number format, with two decimal places

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard