copy worksheet to array

  • Thread starter Thread starter Kalle
  • Start date Start date
K

Kalle

Hi

I know that it is possible to copy a array t o a worksheet but I can't
find out if it's possible to copy a worksheet into an arry?

Thanks in advance
 
You can copy a Range into an array using the varue property like

myarray = Range("A1:F10").value
 
this may be what you're looking for

Sub test()
Dim ws As Worksheet
Dim arr As Variant
Dim rng As Range
Set ws = Worksheets("Sheet1")
arr = ws.Range("A1:P1000")

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top