OLE container limits in VB6
I have created an application in VB6 that displays data from an Excel sheet in an OLE container.
The application adds lines to this container by inserting new data into the first row of the worksheet, then updating the OLE container.
However, as more lines are added, effectively off the bottom of the display, the displayed font slowly grows, until the text becomes unreadable.
If the user right-clicks the data and edits, when the Excel edit is completed, the font returns to normal.
This is driving me crazy, as I cannot find any way of stopping this font growth.:mad:
Does anyone have any ideas?
Re: OLE container limits in VB6
Could you zip up your project and attach it. I'd like to run it and take a look.
1 Attachment(s)
Re: OLE container limits in VB6
Hack, thanks for taking an interest.
I've resolved that original problem, by dumping the OLE container approach, and just running Excel directly from my code.
However, I still have a problem. though somewhat different:
If someone tries to open the Event Log.xls sheet, whilst my app is running, that breaks the link, and I can no longer control Excel.
I can set the file as Hidden, etc, but I would really prefer a more "hardened" form of protection. In reality, my app should be the only way of adding entries to the log.
Your thoughts would be appreciated.
Jim
Re: OLE container limits in VB6
You have:
Code:
master_file = App.Path & "\Event Log.xls"
Maybe
Code:
master_file = App.Path & "\Event Log.xxls"
or
Code:
master_file = App.Path & "\Event Log.slx"
or
Code:
master_file = App.Path & "\Event Log.My_app_only"
Hope it helps.
5ms