PDA

Click to See Complete Forum and Search --> : Excel Object


virux
Jul 27th, 2000, 10:51 PM
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

Nitro
Jul 28th, 2000, 07:37 PM
'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