![]() |
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 |
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 . |
All times are GMT +1. The time now is 01:33 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com