PDA

View Full Version : [SOLVED] Get value and color of cells with Access



bamoo
07-25-2005, 04:16 AM
Hello
I would like to know how to get value and color of cells with Access ?
Thanks :-)

Bob Phillips
07-25-2005, 04:37 AM
Hello
I would like to know how to get value and color of cells with Access ?
Thanks :-)

Do you mean from within Access?

This might get you started


Set xlApp = CreateObject("Excel.Application")
Set xlWB = xlApp.Workbooks.Open("C:\myData\myExcel.xls")
Set xlWS = xlWB.Worksheets("Sheet1")
With xlWS.Range("A1")
MsgBox .value
MsgBox .Interior.ColorIndex
End With

bamoo
07-25-2005, 12:21 PM
Thanks. It's exactly what I wanted :-)