Advertisement
ASP_Volume3 Microsoft Office Apps/VBA #53211

Retrieve Excel Cell Values Easily

Retrieves Excel spreadsheet cell information based on a set of parameters sent to the function. It then sets the value of the variable assigned when retrieveing the information.

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
Function getExcel(rowval As Integer, columnval As String, excelfile As String)
Dim excelSheet As Object 'Excel Sheet object
  
  'Create an instance of Excel by file name
  Set excelSheet = CreateObject(excelfile)
  mycell$ = columnval & rowval
  getExcel = excelSheet.activesheet.range(mycell$).Value
  'Retrieve the result using the cell by row and column
  Set excelSheet = Nothing  'release object
  
End Function
Original Comments (3)
Recovered from Wayback Machine