Using VB .NET, I need to determine which cell the user is currently positioned on in a spreadsheet the user has opened in Excel and then I need to retrieve the cell formula. I've tried using:
Public oExcel As Excel.Application
Public oBook As Excel.Workbook
oExcel = New Excel.Application
oBook = oExcel.Workbooks.Open([path to spreadsheet])
sFormula = oExcel.ActiveCell.Cells.Formula
However, this retrieves the cell formula that the user was last positioned on when he closed the spreadsheet. I need to get the cell he is currently positioned on.
Thanks for any and all help.
Ken
Public oExcel As Excel.Application
Public oBook As Excel.Workbook
oExcel = New Excel.Application
oBook = oExcel.Workbooks.Open([path to spreadsheet])
sFormula = oExcel.ActiveCell.Cells.Formula
However, this retrieves the cell formula that the user was last positioned on when he closed the spreadsheet. I need to get the cell he is currently positioned on.
Thanks for any and all help.
Ken