Here’s another post of something I created long ago, yet never got to post. Just trying to catch up here 🙂
While looking for a control myself to achieve this, I couldn’t find any. Some VB6 controls we’re available, yet when distributing spreadsheets or databases I just don’t like to create to much dependencies on external controls. Quite often the support required goes through the roof when external dependencies are used.
Finally I found something that I could have used, yet it didn’t suit my needs well enough, so I decided to rewrite the whole thing, but retaining the concept. The original was created by Dev Ashish and Marc Chouteau and can be found on the Access MVP site. It was build on Access and didn’t work on any of the other Office applications, additionally it didn’t support nesting multiple splitters and controls.
As mentioned my code uses the same concept still, a label control on the location of the splitter, then the events of the label can be used to track any splitter activity to be executed. It supports both Access and Excel (and other Office apps), but it requires a compiler directive to be set (Access has different form properties than the other apps). The main code is contained in two classes, a splitter and a helper class. There is an aditional module that is used for some support functionality (this one is slightly different for the Access version). The whole thing is VBA only, so no external dependencies are required.
The code can be downloaded in a zip file (downloaded 3746 times). It has 2 examples, one for Excel and one for Access (the Excel example has detailed comments in its code on how to set things up, especially with nested splitters).
The Access version will not work on tab controls (but that can probably be overcome easily) and not on resizeable forms (very hard, due to the order of events Access generates and the modifications that are automatically made)
Alain Darscotte kindly provided me with his updated Access version of this splitter that (supposedly, haven’t checked) handles resizing and/or tab controls better.
It has extensive modifications, I haven’t tried it and I only provide it here as a download. (downloaded 1924 times). The download contains the email exchange with Alain, with some comments by him. Apologies for the long time it took me to actually post it here.
[ad name=”468×60 Banner”]