ProteanBeing
02-02-2008, 11:17 AM
I put a spreadsheet control into a userform. How do I move data into it using VBA code?
Hi
this is one way you could do it
Private Sub UserForm_Initialize()
Spreadsheet1.Sheets(1).Select
Dim myrow As Long
Dim mycol As Integer
For myrow = 1 To 5
For mycol = 1 To 7
Spreadsheet1.Cells(myrow, mycol).Value = Sheet1.Cells(myrow, mycol).Value
Next mycol
Next myrow
End Sub
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.