Interpreting Excel cell color (1 Viewer)

geoB

Registered User.
Local time
Today, 04:57
Joined
Oct 10, 2008
Messages
68
I've just learned that my client for whom I'm designing an Access app to replace their Excel spreadsheets has assigned significance to the color of the row. My original plan was to pop the spreadsheet into a table and distribute the data from there. With cell color being meaningful that's probably not going to work. What tools might there be for reading the cell color? Excel's cell("color",{address}) function is useless for this - it only returns 1 or 0.

Thanks immensely.

George
 

DJkarl

Registered User.
Local time
Today, 06:57
Joined
Mar 16, 2007
Messages
1,028
You would need to create an Excel Application object in VBA and read in the cells color property from a worksheet.
 

Vonnie

Registered User.
Local time
Today, 04:57
Joined
Aug 21, 2008
Messages
57
you are trying to read a cell color from an Existing spreadsheet via Access? If you declare an Excel object you can navigate to a cell address and read the color, if I am understanding you correctly

MsgBox ExcelSheet.Application.Cells(1, 1).interior.Color
 

geoB

Registered User.
Local time
Today, 04:57
Joined
Oct 10, 2008
Messages
68
Vonnie,

Thanks for the lead. I've not used vba in Excel before, so it'll be another climb up the learning curve. Oh, well. ON BELAY!

The result: created functions in Excel to return and set the color. Hardest part was learning how to make the functions work in excel! Used the MS Excel programming forum for info. Thanx again for the tip.


g
 
Last edited:

Users who are viewing this thread

Top Bottom