T
Tyler W. Wilson
I have a sheet with columns named that I want to access in code. And the
area I want to acees is also named.
I want to be able to write code like this (which is pseudo code of course):
Dim table As Range
table = Sheets("Books").Range("OutOfPrint")
Dim row As Range
For Each row In table
Dim title As String
Set title = row.Column("Title")
Dim cost As Integer
Set cost = row.Column("Cost")
Next row
The bit I don't get is how I can do the Column("<Name>") magic. Any ideas?
Thanks,
Tyler
area I want to acees is also named.
I want to be able to write code like this (which is pseudo code of course):
Dim table As Range
table = Sheets("Books").Range("OutOfPrint")
Dim row As Range
For Each row In table
Dim title As String
Set title = row.Column("Title")
Dim cost As Integer
Set cost = row.Column("Cost")
Next row
The bit I don't get is how I can do the Column("<Name>") magic. Any ideas?
Thanks,
Tyler