Maximum Value in Excel Column From Access (1 Viewer)

The Archn00b

Registered User.
Local time
Yesterday, 19:10
Joined
Jun 26, 2013
Messages
76
Hi I'm using Excel vba for the first time and I'm trying to find the maxium value in the column AI (No. 35) in an Excel spreadsheet FROM Access.

So I've got:

Code:
Dim appExcel As Object
Dim datLast As Date

Set appExcel = CreateObject("Excel.Application")

datLast = appExcel.Workbooks("Path").Worksheets("Sheet1").WorksheetFunction.Max(Columns("35"))

Thanks!
 

namliam

The Mailman - AWF VIP
Local time
Today, 04:10
Joined
Aug 11, 2003
Messages
11,695
can you link the sheet as a linked table? Then you can simply query it :)
 

The Archn00b

Registered User.
Local time
Yesterday, 19:10
Joined
Jun 26, 2013
Messages
76
Yeah I just did that in the end. Good idea.
 

Users who are viewing this thread

Top Bottom