View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Brad Brad is offline
external usenet poster
 
Posts: 846
Default Adding a column to a table

I'm trying to add a column to a table in excel using vba. Here is the code I
have.

Dim tblData As ListObject
Dim calendarWeek As ListColumn

tblData = Sheets("Sheet1").ListObjects("Table1") <- Error Here
calendarWeek = tblTop8Issue.ListColumns.Add
calendarWeek.Name = "Calendar Week"
calendarWeek.DataBodyRange = "WEEKNUM([Date])"

I get an error on the first line saying Invalid Use of Property...Please help