Thread: Declaring Array
View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
Fredriksson via OfficeKB.com Fredriksson via OfficeKB.com is offline
external usenet poster
 
Posts: 51
Default Declaring Array

Thanks
Tom Ogilvy wrote:
Dim Array1()
Dim NumOfRows as Integer
Dim sh as Worksheet, sh1 as Worksheet
NumOfRows = 200
ReDim Array1( 0 to NumOfRows, 1 To 2 )

' code that loads the array

set sh1 = Activesheet

Worksheets.Add After:=Worksheets(worksheets.count)
set sh = Activesheet
sh.Range("A1").Resize(ubound(Array1,1) - _
lbound(array1,1) + 1, 2).Value = Array1
Msgbox "Look at the array"
Application.DisplayAlerts = False
sh.Delete
Application.displayAlerts = True
sh1.Activate

--
Regards,
Tom Ogilvy

I will need to calc the number of rows from a worksheet that is being updated.

[quoted text clipped - 20 lines]
How do I declare an array where I know the Number of Columns but the number
of rows is Dynamic The Columns should be type text


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200703/1