View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default How to insert array into range

Sub Macro1()
Dim s(10, 10) As String
For i = 1 To 10
For j = 1 To 10
Cells(i, j).Value = s(i, j)
Next
Next
End Sub

Use the above for a range of the same dimensions as the string array.
Or use an Offset if you need it.
--
Gary''s Student


" wrote:

Hi

I have a Visual Basic program (Visual basic.NET 2005) where I automate
Excel (2003).
In the program, I have a two dimensional array of strings, that I need
to paste into a range in Excel.
How do I do it?

Best regads, Lars Olsen
Denmark