My Assistant
![]() ![]() |
|
|
Jun 3 2006, 03:14 PM
Post
#1
|
|
|
UtterAccess Guru Posts: 877 |
I'm able to open the Excel workbook and worksheet using:
CODE Set oExcel = CreateObject("Excel.Application") Set oBook = oExcel.Workbooks.Open _ (Me.ImportFile) Set oSheet = oBook.Worksheets(WorkSheetName) ValueofCell = oSheet.Cells(CellName).Value Let's not get hung up on declarations and where WorkSheetName and CellName come from. This all works okay and appropriate declarations are in my code. My problem is with the ValueofCell statement. CellName is in the form 'A25', 'F15', etc. Whereas oSheet.Cell requires row number and column number. Is there an alternative to Cells or can I convert A25 to Row 1 Column 25 in code. Thanks. |
|
|
|
Jun 3 2006, 07:17 PM
Post
#2
|
|
|
UtterAccess Enthusiast Posts: 83 From: Leeds, UK |
If I recall correctly, you can use:
CODE ValueofCell = oSheet.Range(CellName).Value
|
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 19th June 2013 - 06:13 AM |