LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Store data in array

Hello,

I have a workbook with hidden rows. How can I modify the following
code to store the hidden columns in an array?

<CODE BEGIN

Sub ArrayStore()
Dim i As Long 'Integer
Dim rng As Range

'1. Find last column with data
Set rng = Cells.Find(What:="*", After:=Range("IV65536"), _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByColumns, _
SearchDirection:=xlPrevious)
colnum = rng.Column + 1
'2. Store Hidden Columns
Dim hCol()
Dim hColI As Integer
For hColI = 1 To colnum
If Columns(hColI).EntireColumn.Hidden = 0 Then hCol() =
Array(hColI & ",")
Next

For i = LBound(hCol) To UBound(hCol)
MsgBox i & ", " & hCol(i)
Next

End Sub

<CODE END

Thank you for your help,
jfcby
 
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
Store array ??? piero Excel Worksheet Functions 4 September 16th 09 04:39 PM
How to store the reference of Workbooks in an array. Store a reference of a excel workbook[_2_] Excel Programming 4 March 6th 09 12:04 AM
Can you store a value in different levels of a multi array? Gerardo Excel Programming 2 June 11th 08 08:46 PM
How Do You Take Data Off A Sheet and Store It In An Array Raleigh Excel Programming 2 January 17th 06 08:47 PM
Lookup and store in array kanuvas[_7_] Excel Programming 1 November 9th 05 10:43 AM


All times are GMT +1. The time now is 07:17 PM.

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

About Us

"It's about Microsoft Excel"