Paste into Excel without MS Access Table header

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dmkeith2@hotmail.com

    Paste into Excel without MS Access Table header

    This is probably easy to do but I can't find it in the groups.

    How do I paste into an excel document without the MS Access headers? I
    just want to paste the data.

    Thanks

  • Kc-Mass

    #2
    Re: Paste into Excel without MS Access Table header

    I don't believe you can do it with a mouse and keyboard.
    In the interactive mode you get the header row and delete it.

    You can do it without the header in VBA as follows:
    'set the worksheet you want to paste into
    Set xlSheet = xlBook.Workshee ts("TheSheetToP asteInto")
    'clear out the old data
    xlSheet.Range(" b2:v15000").Cle ar
    'open the recordset you want to copy from
    Set RS = db.OpenRecordse t("QueryorTable YouGetDataFrom" )
    copy the data, without header, to the worksheet starting in cell "B2"
    xlSheet.Cells(2 , 2).CopyFromReco rdset RS

    Kevin C




    <dmkeith2@hotma il.comwrote in message
    news:1168340669 .681629.190290@ 51g2000cwl.goog legroups.com...
    This is probably easy to do but I can't find it in the groups.
    >
    How do I paste into an excel document without the MS Access headers? I
    just want to paste the data.
    >
    Thanks
    >

    Comment

    Working...