First before I forget, thanks again for the help.
Maybe I need to go find a more comprehensive book.  The one I have does not 
mention the Set command, does not list Range as a data type, does not 
mention tables (which may be useful but that is too ambitious at this 
point).
 
>From the other thread, thanks for clarifying the column name item. I am 
very surprised there is not a way to specifically designate if a row is 
column names or data but seems easy to make it work.
 
What I will ultimately be doing here if I can get over not having done any 
programming for 20 years and the always rough (for me at least) initial 
learning curve... is have a set of columns of data and need to run a gonzo 
number of simulations on the data where I am moving down the columns of 
cells and based upon the value of one cell relative to another make certain 
decisions and set certain other column values.  The entire data set will 
change frequently due to parameters outside the working data set.   So that 
is why I may want to use just a reference index and not the range so I can 
just loop down the columns until I hit bottom.
 
I cleaned up the code based on what you said.  It did turn out the order in 
which I wrote the code caused some errors.  (I would like a way to have it 
not interrupt me with error messages when I am entering code and may move 
between lines that are not complete yet).  
 
I am getting it to work now due to a "well duh" error.  I was reading the 
font color and needed the fill color.   I am still confused still though 
why all the 3 methods you gave me in the code below seem to return the 
value from the same cell.  What is this form really doing different from 
the others?
mycolor = BWTStop.Cells(ActiveCell.Row - BWTStop.Cells(1).Row + 1, 
1).Interior.Color
 
 
Here is the new code:
 
'   Column reference object
    Dim BarDate As Range
    Dim BarTime As Range
    Dim Baropen As Range
    Dim Barhigh As Range
    Dim Barlow As Range
    Dim Barclose As Range
    Dim BWTStop As Range
    Dim Short_Long_Cash As Range
        
    With Sheets("ChartData").UsedRange  'All the columns will only have the 
used range.
        Set BarDate = .Columns(WorksheetFunction.Match("BarDate", .Rows(1), 
0))
        Set BarTime = .Columns(WorksheetFunction.Match("BarTime", .Rows(1), 
0))
        Set Baropen = .Columns(WorksheetFunction.Match("BarOpen", .Rows(1), 
0))
        Set Barhigh = .Columns(WorksheetFunction.Match("BarHigh", .Rows(1), 
0))
        Set Barlow = .Columns(WorksheetFunction.Match("BarLow", .Rows(1), 
0))
        Set Barclose = .Columns(WorksheetFunction.Match("BarClose", 
.Rows(1), 0))
        Set BWTStop = .Columns(WorksheetFunction.Match("BWTStop", .Rows(1), 
0))
        Set Short_Long_Cash = 
.Columns(WorksheetFunction.Match("Short_Long_Cash", .Rows(1), 0))
    End With
'
    Dim mycolor
    mycolor = BWTStop.Cells(ActiveCell.Row, 1).Interior.Color
    Debug.Print mycolor
    mycolor = BWTStop.Cells(ActiveCell.Row - BWTStop.Cells(1).Row + 1, 
1).Interior.Color
    Debug.Print mycolor
    mycolor = Application.Intersect(ActiveCell.EntireRow, 
BWTStop).Interior.Color
    Debug.Print mycolor
 

-- 
FORUM RULES (986+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com

Reply via email to