Consulting

Results 1 to 3 of 3

Thread: Possible 1-liner

  1. #1
    VBAX Master stanl's Avatar
    Joined
    Jan 2005
    Posts
    1,141
    Location

    Possible 1-liner

    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

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

    can this be condensed into a single line? Stan

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]

    Sheets("schexport").Range("B12:F12").Copy Sheets("toisnot").Range("b36")
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Master stanl's Avatar
    Joined
    Jan 2005
    Posts
    1,141
    Location
    Uh! I felt so dumb after pressing the enter key... it is that easy. Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •