resize rows and column

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi

how do i resize rows and column so that i can see the whole data in the cell
without doing it manually? i'm using visual basic .net
 
Hi,

I am not sure if this is the answer of your query.

Sub TestMyArray()

'Declare array
'But, remember to start it from 1
'So, do not start it from 0

Dim FinalOutput(1 To 2, 1 To 4) As Integer

FinalOutput(1, 1) = 100
FinalOutput(1, 2) = 200
FinalOutput(1, 3) = 300
FinalOutput(1, 4) = 400
FinalOutput(2, 1) = 170
FinalOutput(2, 2) = 270
FinalOutput(2, 3) = 370
FinalOutput(2, 4) = 470

'Call array and paste
Range("b2").Resize(2, 4) = FinalOutput

End Sub


Hope it works.

Regards,

Noor Faiz
 
Use the Autofit method
Activesheet.Columns.Autofit
Activesheet.Rows.Autofit

With kind regards,
Ton Teuns
 

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