'******************************************************************
'
'GETCELLVALUE
'
'PRECONDITIONS:
' --Excel workbook to be read is open and has focus.
'
'PARAMETERS:
' sheet - The name or index of the sheet to read from
' colnum - Column of the cell to read
' rownum - Row of the cell to reat
'
'RETURN VALUE : Contents of the designated cell.
'Created By : Jai
'******************************************************************
Public Function GetCellValue(sheet, colnum, rownum) 'As String
Dim Excel
'Get the Excel object
Set Excel = GetObject(,"Excel.Application")
GetCellValue = Excel.ActiveWorkbook.Worksheets(sheet).cells(rownum,colnum).Value
Set Excel = Nothing
End Function
'
'GETCELLVALUE
'
'PRECONDITIONS:
' --Excel workbook to be read is open and has focus.
'
'PARAMETERS:
' sheet - The name or index of the sheet to read from
' colnum - Column of the cell to read
' rownum - Row of the cell to reat
'
'RETURN VALUE : Contents of the designated cell.
'Created By : Jai
'******************************************************************
Public Function GetCellValue(sheet, colnum, rownum) 'As String
Dim Excel
'Get the Excel object
Set Excel = GetObject(,"Excel.Application")
GetCellValue = Excel.ActiveWorkbook.Worksheets(sheet).cells(rownum,colnum).Value
Set Excel = Nothing
End Function
Comments