Results 1 to 3 of 3

Thread: write exel

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2004
    Posts
    86

    write exel

    does somebody know how to write data to diffrent cells in an exel file


    i can write in cell a1 but not in other cells


    can someone help me

  2. #2
    PowerPoster Pasvorto's Avatar
    Join Date
    Oct 2002
    Location
    Minnesota, USA
    Posts
    2,951
    xlSheet.Cells(X, y).Value = new value

    X = row
    y = cell

    xlBook.Close savechanges:=True

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2004
    Posts
    86
    i have googled a bit and i found this

    Private Sub Form_Load()
    Dim xl As Object
    Dim wrk As Object
    Dim sht As Object
    Set xl = CreateObject("Excel.Application")
    Set wrk = xl.Workbooks.Add()
    Set sht = wrk.ActiveSheet
    sht.Cells(1, 1) = "a"
    sht.Cells(1, 2) = "b"
    sht.Cells(1, 3) = "c"
    sht.Cells(2, 1) = "'1"
    sht.Cells(2, 2) = "'2"
    sht.Cells(2, 3) = "'3"
    wrk.SaveAs ("c:\test.xls")
    xl.Quit
    End Sub


    can someons tell me if i can change a backgorund from a cell to

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