?
Solved

Excel Treeview expanding on Auto Save

Posted on 2011-10-24
7
Medium Priority
?
848 Views
Last Modified: 2012-05-12
Hi,

I have a treeView popualted with data in an excel spreadsheet. What I'm finding is everytime I press Save or the Auto Save feature kicks in all the Nodes on the TreeView are expanded. Is this a way to prevent this happening as there are many levels of Nodes and you can easily lose track of where you were if the Auto Save feature is activated while your selecting items in the treeView

Thanks

gavin
0
Comment
Question by:victoriaharry
  • 3
  • 3
7 Comments
 
LVL 35

Expert Comment

by:Norie
ID: 37022227
Gavin

How and when is the treeview been populated?

Is it from some source that could be affected by calculation? eg cells with formulas, dynamic named ranges.
0
 

Author Comment

by:victoriaharry
ID: 37022241
Everytime a specific comboBox is changed I populate the treeview from data outside of Excel. The treeview can sit there and not be touched then when the Auto save kicks in it will expand all the nodes. very annoying.
To answer your question there is no reference in the treeview to any excel cells, ranges, etc. When the comboBox is changed I connect to the external source and build the treeview then close the connection
0
 
LVL 17

Expert Comment

by:andrewssd3
ID: 37022486
Do you have any code that is handling one of the workbook_beforesave type events?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:victoriaharry
ID: 37022508
No, the only event I'm using for the workbook is Workbook_Open() which sets a few default values for me and the Workbook_deactivate() which sets Application.DisplayFormulaBar = True

Gavin
0
 
LVL 35

Expert Comment

by:Norie
ID: 37023380
Gavin

Same question really but for the comboboxes.

I'm wondering  if there is something triggered by calculation or save that causes the behaviour you describe.

That could be the change event of the combobox.

0
 

Author Comment

by:victoriaharry
ID: 37023463
If a combobox is changed then it will trigger an event to populate the treeview. What I'm finding is if I leave the computer alone (ie, go to lunch) when I get back the auto save would of kicked in several times and all the nodes in the treeview would be expanded.
0
 
LVL 35

Accepted Solution

by:
Norie earned 2000 total points
ID: 37023552
The change event of the combobox might be getting triggered by save.

Actually it might not be the save itself that causes it but the automatic calculation that happens when a worksheet is saved.

Calculation could be triggering the combobox.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question