Results 1 to 2 of 2

Thread: Excel Object

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2000
    Posts
    7

    Wink

    hi ~!~!

    anybody knows how to delete a row/column in my worksheet from a VB program?

    and any way to find out all the API to use Excel in VB? any GOOD pointer?

    cheers,
    virux

  2. #2
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Nitro
    Posts
    633
    Code:
    'Here is how you delete a row - deleting row 3.
    
    Private Sub cmdCreateObject_Click()
       Dim xlApp As Object
       Set xlApp = CreateObject("Excel.Application")
       xlApp.Visible = True
       xlApp.Visible = True
       xlApp.Workbooks.Add
        
       Dim int_X As Integer
       For int_X = 1 To 10
        Cells(int_X, 1).Value = int_X
       Next
       xlApp.Rows("3:3").Delete
       'xlApp.Quit
       Set xlApp = Nothing
    End Sub
    Chemically Formulated As:
    Dr. Nitro

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