LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default My VBA Script

this is the base of my script so far

Sub PasteSpecial()
Dim DeleteRows As Range
Range("A1:A3").Copy
Range("C4").Select ' This is the problem
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks:=False, Transpose:=True

Set DeleteRows = Range("A1:A8") ' this deletes the row that I just
copied. i.e. cut
DeleteRows.Delete Shift:=xlShiftUp
End Sub

This works great but it will overlap, paste over paste, becuase I have
the second range set to C4.

I want some how for the C4 to change after every copy so it would be
like this...
Range("A1:A3").Copy
Range("C4").Select ' This is the problem
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks:=False, Transpose:=True

Range("A1:A3").Copy
Range("C5").Select ' This is the problem
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks:=False, Transpose:=True

Range("A1:A3").Copy
Range("C6").Select ' This is the problem
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks:=False, Transpose:=True

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
help with vba script lariveesl New Users to Excel 5 June 6th 09 08:53 AM
Script Help? couger77[_8_] Excel Programming 1 April 7th 04 01:47 AM
Excel 2000/XP script to Excel97 script hat Excel Programming 3 March 2nd 04 03:56 PM
VB Script help Quanchi Excel Programming 3 October 6th 03 03:13 PM


All times are GMT +1. The time now is 07:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"