Treview hangs Excel

G

Guest

I have problems with TreeView controls on a worksheet: on reopening the
workbook, they resize the scrollable area; and on saving or closing the
workbook, Excel crashes.

I could use the treeviews on a form, but they are more useful on the sheet,
where they act as a drag-and-drop target for data files, capturing the file
name and path without actually opening the file and displaying cascading
graphic of the network drive and folder structure.

Anyone got a workaround? Or is there a magical API call to prevent the
TreeView hanging Excel?


The relevant files are:

Microsoft Excel 2002 SP3
Tree View ActiveX Control - Version 6.0 (SP6)

Using a later version of Excel is not an option; we migrate to XP later this
year, but that's outside my delivery deadline.
 
G

Guest

A sensible suggestion, but it doesn't work: not even when the TreeView
control is disabled.

Time for some lateral thinking: Treeview controls work in forms, but not on
worksheets. So the problem is the interface between control and sheet... Put
something else on the sheet and put the treeview in that.

So I've put an MS Forms 2.0 Frame control on my worksheet, and inserted a
treeview into the frame. The properties dialogues exposed by a frame's 'edit'
mode are a throwback to the 1980's but the listview is exposed in VBA as
myFrame.Controls(0) - which is easy to programme if referenced to a Listview
object variable declared WithEvents...

....Not-Quite-A-Kludge. But it hasn't crashed yet, and it doesn't display the
strange behaviours I was seeing yesterday. And I have an effective workaround
to all the other application stability problems associated with ActiveX
controls placed directly on the worksheet.

N
 

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