AJP Excel Information AJP Excel Information

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
   


Created August 2004
Last updated 5th August 2014 


Return to main page Chart Section VBA section Fun and games section Forum files Tips section Links section Book section Site information Site Search RSS feed Top of page


Microsoft® and Microsoft® Excel are registered trademarks of the Microsoft Corporation.
andypope.info is not associated with Microsoft. Copyright ©2007-2016 Andy Pope