Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Using Windows Xp & XL2002 I require advice cleaning up part of my code printed below. I should add, the code is working ok. The code converts a single column of text 7 or 8 pages long to 3 to 4 pages of double columns of text. ( for printing only ). The two columns of text always fit across the page width .. The code cuts & copies the text from page 2 Column A & to Column C on page 1. The space left on page 2 Column A is deleted moving page 3 text up, to become the start of page 2. The code starts it's cut & paste again until 4 pages remain. Range("A60:A117").Cut Range("C2").Select ActiveSheet.Paste Range("A60:A117").Delete shift:=xlUp Range("A118:A175").Cut Range("C60").Select ActiveSheet.Paste Range("A118:A175").Delete shift:=xlUp I would like to reduce the codes length, doing away with the Select part & combining some lines into one line.. Can the "Range("A60:A117").Cut" line be altered to include the "Delete shift=xlup". Can the Range("C2").Select line & the "ActiveSheet.Paste" line be combined. The code started out as a recorded macro, which I have modified to reduce the number of Activates & Selects but can not progress any further. The code does not start with any Dim statements or declarations etc. TIA Bob Christie (still on the steep learning curve) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
code to fill in missing border lines | Excel Discussion (Misc queries) | |||
how do i comment 1000 lines of code at once in vba for excel? | Excel Worksheet Functions | |||
Code for Inserting Multiple lines | Excel Discussion (Misc queries) | |||
Excel skip some lines of VBA code | Excel Programming | |||
Code Text Into Chart Lines? | Excel Programming |