February 15th, 2000, 10:38 PM
Hello all, this code here works great to change the 3 column of the first row in excel sheet when the excel file is open, How can I change the excel sheet when it is not even open
here's my code:Private Sub Command1_Click()
Dim xlBook As New Excel.Workbook
Set xlBook = CreateObject("test.xls")
Dim xlSheet As Excel.Worksheet
Set xlSheet = xlBook.Worksheets(1)
xlSheet.Cells(1, 3).Value = 4
End Sub
here's my code:Private Sub Command1_Click()
Dim xlBook As New Excel.Workbook
Set xlBook = CreateObject("test.xls")
Dim xlSheet As Excel.Worksheet
Set xlSheet = xlBook.Worksheets(1)
xlSheet.Cells(1, 3).Value = 4
End Sub