S
SIN
hi,
i trying to read from excel file, i get error - "Object doesnt support this
property or method"
Private Sub import_data_Click()
Dim xlApp As Object
Dim xlSht As Excel.Worksheet
Dim xlRng As Excel.Range
Dim v_test As String
Set xlApp = CreateObject("Excel.Application")
xlApp.DisplayAlerts = False
xlApp.Workbooks.Open ("c:\test.xls")
xlSht = xlApp.Sheet(1) <<<------- here
xlRng = xlSht.Cells(1, 1)
v_test = xlRng.Value
MsgBox ("test" & v_test)
xlApp.Workbooks.Close
End Sub
thanks.
i trying to read from excel file, i get error - "Object doesnt support this
property or method"
Private Sub import_data_Click()
Dim xlApp As Object
Dim xlSht As Excel.Worksheet
Dim xlRng As Excel.Range
Dim v_test As String
Set xlApp = CreateObject("Excel.Application")
xlApp.DisplayAlerts = False
xlApp.Workbooks.Open ("c:\test.xls")
xlSht = xlApp.Sheet(1) <<<------- here
xlRng = xlSht.Cells(1, 1)
v_test = xlRng.Value
MsgBox ("test" & v_test)
xlApp.Workbooks.Close
End Sub
thanks.