Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Simple Array question

Tom,

Try

UBound(A) - LBound(A) + 1

You can go through the array with code like

Dim N As Long
For N = LBound(A) To UBound(A) Step 1
Debug.Print A(N)
Next N


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Tom Walker" wrote in message
...
hi,
I have a function "HiddenItemslist" which returns an
array of items. How do I know the no of items in the
array after the function assignment?

Like this:

Dim A as variant

A = ActiveSheet.PivotTables("PivotTable1").PivotFields
("[Project].[Project Name]"). _
HiddenItemsList


"A" will have a list of items. Basically I want to
traverse thru the list to see if an item that I want is
there is not. how do I do this?

Thanks,
Tom



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Simple Array question

thank you

-----Original Message-----
Tom,

Try

UBound(A) - LBound(A) + 1

You can go through the array with code like

Dim N As Long
For N = LBound(A) To UBound(A) Step 1
Debug.Print A(N)
Next N


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Tom Walker" wrote in message
...
hi,
I have a function "HiddenItemslist" which returns an
array of items. How do I know the no of items in the
array after the function assignment?

Like this:

Dim A as variant

A = ActiveSheet.PivotTables("PivotTable1").PivotFields
("[Project].[Project Name]"). _
HiddenItemsList


"A" will have a list of items. Basically I want to
traverse thru the list to see if an item that I want is
there is not. how do I do this?

Thanks,
Tom



.

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF formula-simple question; simple operator Rich D Excel Discussion (Misc queries) 4 December 6th 07 03:36 PM
Simple Array Marilyn Excel Discussion (Misc queries) 1 August 3rd 07 03:42 AM
Make formula more simple --- array? Nikki Excel Discussion (Misc queries) 6 April 11th 07 07:21 PM
Simple Simple Excel usage question BookerW Excel Discussion (Misc queries) 1 June 23rd 05 10:06 PM
Simple Array question John Thomas Excel Programming 0 August 12th 03 11:14 PM


All times are GMT +1. The time now is 01:19 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"