S
Sean
hi,
I have an excel sheet, and i want to be able to read thru' the cells of the excel sheet and pick up values and store them in a place for every line.
like read all B columns till the end of the file and then read all D columns. I want to be able to store these two values in someplace, so then i could do some other calculations.
please let me know whether i am going on the right track so far and just need some help to figure out how to read the xls sheet.
here is my code so far,
' appExcel is set as an Object
Dim appExcel As Object
' Specify path for GetObject function
On Error GoTo fix_err
' XLS File is loaded here
Set appExcel = GetObject("C:\temp\QReplacementData.xls")
' The Application remains visible
appExcel.Application.Visible = True
' The Excel file is hidden but running
appExcel.Parent.Windows(1).Visible = False
' want to read column B and D. and store those values
' The appExcel is set to Nothing
Set appExcel = Nothing
' Appropriate Message is displayed
MsgBox "Process Com"
fix_err:
Debug.Print Err.Description + " " + _
Err.Source, vbCritical, "Import"
Err.Clear
I greatly appreciate any help/suggestions.
I have an excel sheet, and i want to be able to read thru' the cells of the excel sheet and pick up values and store them in a place for every line.
like read all B columns till the end of the file and then read all D columns. I want to be able to store these two values in someplace, so then i could do some other calculations.
please let me know whether i am going on the right track so far and just need some help to figure out how to read the xls sheet.
here is my code so far,
' appExcel is set as an Object
Dim appExcel As Object
' Specify path for GetObject function
On Error GoTo fix_err
' XLS File is loaded here
Set appExcel = GetObject("C:\temp\QReplacementData.xls")
' The Application remains visible
appExcel.Application.Visible = True
' The Excel file is hidden but running
appExcel.Parent.Windows(1).Visible = False
' want to read column B and D. and store those values
' The appExcel is set to Nothing
Set appExcel = Nothing
' Appropriate Message is displayed
MsgBox "Process Com"
fix_err:
Debug.Print Err.Description + " " + _
Err.Source, vbCritical, "Import"
Err.Clear
I greatly appreciate any help/suggestions.