I am creating a project in VB 6 where I want to embed an Excel workbook. I have it working correctly so far with the code below.
The writeTable array is an array created in another procedure that I want to populate into the spreadsheet. This array has a couple thousand rows of data. However when the array is copied to the embedded OLE object only about 10 rows are visible. How can I make the whole spreadsheet visible?
A link to advanced automation procedures would be appreciated (hide toolbars, printing, etc).
The reason I am using Excel vs another grid is that I like, and are more familiar with, the formatting functions of Excel sheets (vertical cell orientation, comments, etc). If there is a **free** alternative please let me know.
Private Sub cmdCreate_Click()
Set oXL = OLE1.object
Set oSheet = oXL.Sheets(1)
.Range(.Cells(2, 1), .Cells(NumDays + 1, 7)) = writeTable
Set oBook = Nothing
Set oSheet = Nothing
oXL.Visible = True
Private Sub Form_Load()
OLE1.CreateEmbed vbNullString, "Excel.Sheet"