excel object - content vs. icon

D

Dhonan

I have a field in a table that is an embeded object. When I create the
object, I create it as an excel.sheet. I would ilke it to be an icon on the
form, so when I create I used the following code:
spreadsheet.Class = "Excel.sheet" ' Set class name
spreadsheet.OLETypeAllowed = acOLEEmbedded
spreadsheet.DisplayType = acOLEDisplayIcon
spreadsheet.SourceDoc = Application.CurrentProject.Path & "\test1.xls"
spreadsheet.Action = acOLECreateEmbed
spreadsheet.SizeMode = acOLESizeZoom

This works fine on the form, when the object is clicked, the excel sheet
opens up and can be manipulated.

The problem is when I go to report on this sheet, I want the actual sheet to
be printed, not the icon. If I create it as content, this works on the
report, but then the form has content as well and there is not enough space
on the form to see the entire spreadsheet.

How can I make it an icon on the form, but content on a report?

Thanks
 

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

Top