AJP Excel Information

Charts













 
 

Userform Splitter class
(xl2000 and above)

The workbook contains a class module, CAJPiSplitter, which can be added to a project to allow dynamic creation of a splitter control. The control can be used to resize controls on a userform. In the screen shot above the splitters have been position in and around listbox controls.
 
Example of vba required to setup a splitter control
 
' create splitter between listboxes on left and right
Set m_clsSplitterH = New CAJPiSplitter
' Initialize splitter
m_clsSplitterH.Initialize Me
' Specify which controls are to the left of the splitter
m_clsSplitterH.AddControlsLeft ListBox1, ListBox4
' Specify which controls are to the right of the splitter
m_clsSplitterH.AddControlsRight ListBox2, ListBox3
' Color background of grab handle to green
m_clsSplitterH.GrabHandleBackcolor = RGB(0, 255, 0)
Example workbook

   

Last updated 28th April 2007

 
 
  Home | Charts | VBA Code | Fun Stuff
Newsgroups | Tips | Links | What's New | Book List
Contact | About
Microsoft® and Microsoft® Excel are registered trademarks of the Microsoft Corporation.
andypope.info is not associated with Microsoft. Copyright ©2007 Andy Pope