Set excel cell validation using access generated workbook

C

Chris Archer

I have a workbook and associated worksheet generated using access that I
would like to set validation onto a range of cells.

The code I'd expect to use directly in excel vba would be:

With ExcelAppObj.ActiveSheet.range(rng).Validation
.Add ....
End With

but this does not work when executing from access. It doesn't flag any
errors, and the objects are all populated.

Any help would be greatly appreciated.
Thanks
 
C

Chris Archer

Figured it out.
I forgot to import the excel 11 object library into my references.
 
Top