PDA

View Full Version : Possible 1-liner



stanl
07-25-2007, 05:39 AM
I'm looking to extract vba macro code from 27 workbooks and combine it into a single routine. Basically each month certain values will be imported into an 'Export' tab then distributed amongst other worksheets.

So given existing code like


Sheets("schexport").Select
Range("B12:F12").Select
Selection.Copy
Sheets("toisnot").Select
Range("b36").Select
ActiveSheet.Paste


can this be condensed into a single line? Stan

Bob Phillips
07-25-2007, 05:43 AM
Sheets("schexport").Range("B12:F12").Copy Sheets("toisnot").Range("b36")

stanl
07-25-2007, 05:54 AM
Uh! I felt so dumb after pressing the enter key... it is that easy. Thanks.