Click here to Skip to main content
16,005,467 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how add row or column or format cells,rows and columns in excel sheet using vb.net code
Posted

1 solution

Something like this?
(Change as per requirement)

Private oNewApp As Excel.Application

Private Sub Command1_Click()
Dim oWorkBook As Excel.Workbook
oNewApp.Visible = True
Set oWorkBook = oNewApp.Workbooks.Open("D:\My Documents\Book1.xls")
oWorkBook.Sheets("Sheet1").Rows("10:10").Select
Selection.Insert Shift:=xlDown
End Sub

Private Sub Form_Load()
Set oNewApp = New Excel.Application
End Sub 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900