View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
James O. Thompson James O. Thompson is offline
external usenet poster
 
Posts: 5
Default Syntax for using table and column names

I can't figure out the syntax to use table and column names.

Assume I have a worksheet named "ClubMembers" containing a table named
"Members" with columns "Name" and "Number". Here is a simplified snippet
illustrating a dumb way to refer to them. How do I use table and column
names more elegantly?

Dim oListRow As ListRow
For Each oListRow In _
Worksheets("ClubMembers").ListObjects("Members").L istRows
oListRow.Range.Cells(1, 1) = "No Name"
oListRow.Range.Cells(1, 2) = 0
Next oListRow

Thanks for your help,

Jim Thompson