-
Jan 31st, 2007, 01:30 AM
#1
Thread Starter
New Member
Selection.PasteSpecial
Hi,
Know very little about vb programming so was hoping for some help.
The below code work alright but only for rows 10-14 - it appears the pastesepcial doesnt work for the reminding 15-26 rows. Can anyone explain to me how Selection.PasteSpecial works?
Code:
Sub Run2()
Range("J10:J26").Select
Selection.Copy
Range("K10").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("L10:L26").Select
Selection.ClearContents
Range("L10").Select
End Sub
Cheers
-
Jan 31st, 2007, 01:45 AM
#2
Re: Selection.PasteSpecial
Hi
Welcome to the Forums
Does this help?
VB Code:
Sub Run2()
Range("J10:J26").Select
Application.CutCopyMode = False
Selection.Copy
Range("K10").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'and so on...
End Sub
Tip: Whenever in doubt create a macro on what you want to do and then amend it as per your requirements
Here is a tutorial by RobDog888 on 'Recording Macros'...
http://vbforums.com/showthread.php?t=402032
Hope this helps...
Last edited by Siddharth Rout; Jan 31st, 2007 at 01:50 AM.
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread "Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|