"Rich P" <rp*****@aol.com> wrote in message
news:3f***********************@news.frii.net...
Use an unbound Frame control from the toolbox in a Form's design view.
You can embed an Excel spreadsheet in this control. Just follow the
wizard.
Thanks. I have done that, but when I want to write the information to the
Excel spreadsheet, how do I do that? In regual Excel, I declare an object
variable and instantiate it. Then I query the Access database, load the
recordset into an array of customtype, and write the data to individual
cells in the ActiveWorksheet. For example:
For iCtr = 1 To UBound(FundPerfArray)
oXLWKS.Range("B" & N) = FundPerfArray(iCtr).strFund_Name
oXLWKS.Range("C" & N) = FundPerfArray(iCtr).str_Category
oXLWKS.Range("D" & N) = FundPerfArray(iCtr).strTicker
...
Next iCtr
This code writes to cells in the ActiveWorksheet. I want to do the same
thing with the spreadsheet embedded in the form so that the user has a
preview of what the final output will be and also will have the opportunity
to modify it. But I cannot seem to find how to access the Range property of
the embedded spreadsheet. The object inspector only shows properties such
as boderstyle, height, width, etc. Can't you use VBA to write to this
embedded sheet as opposed to only using it in an interactive fashion?