Results 1 to 3 of 3

Thread: vb and excel

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Posts
    3

    Angry vb and excel

    Please who can help me.....

    I want simply: start excel, pase data in row and save in a excel file all this with vb6.....

    Is there a very short way to do this ??

  2. #2
    Junior Member Gold4tune's Avatar
    Join Date
    Apr 2001
    Location
    Québec
    Posts
    19

    Smile I like this... Excel

    first, you have to add the references : Microsoft Excel 9.0 object library.

    after, you just have to do something like this:

    Dim ExApp As Excel.Application
    Dim ExWbk As Excel.Workbook
    Dim ExSheet As Excel.Worksheet
    Dim ExRng As Excel.Range

    Set ExApp = CreateObject("Excel.Application")
    Set ExWbk = oXL.Workbooks.Add
    Set ExSheet = oWB.ActiveSheet

    ExSheet.Cells(1, 2).Value = "Excel"

    ExApp.Visible = True
    ExApp.UserControl = True

    Set oExRng = Nothing
    Set ExSheet = Nothing
    Set ExWbk= Nothing
    Set ExApp = Nothing

    if you need help again... Just ask!!!

  3. #3
    Junior Member Gold4tune's Avatar
    Join Date
    Apr 2001
    Location
    Québec
    Posts
    19

    scuse me

    scuse me... replace this:
    Set ExApp = CreateObject("Excel.Application")
    Set ExWbk = oXL.Workbooks.Add
    Set ExSheet = oWB.ActiveSheet
    by this
    Set ExApp = CreateObject("Excel.Application")
    Set ExWbk = ExApp.Workbooks.Add
    Set ExSheet = ExWbk.ActiveSheet

Posting Permissions

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



Click Here to Expand Forum to Full Width