Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default HeaderRowRange

I am trying to iterate thru column headers in a 2010 table

Dim oWs As Worksheet: Set oWs = Application.ActiveSheet
Dim oLO_table As ListObject: Set oLO_table = oWs.ListObjects(TABLE_ACTUALS)
Dim oRg_header_row As Range: Set oRg_header_row = oLO_table.HeaderRowRange
Dim num_columns As Long: num_columns = oRg_header_row.Columns.Count

Then I try and view all the names in a loop


For ndx = 0 To num_columns - 1
title = oRg_header_row.Offset(0, ndx).value
...
next

I get nothing but nulls. Table is there, I can see it in the watch window.
column count is correct. Where is my mistake?

thank you
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default HeaderRowRange


For ndx = 1 To num_columns

Title = oRg_header_row.Cells(ndx)

Next

Thanks again Mr. Busch. These new, to me, objects can be very confusing.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"