View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dreiding Dreiding is offline
external usenet poster
 
Posts: 80
Default Slidebar (scrollbar) insertion through VBA

I am try to create a macro that will append a new row in my table. The
constraint is that some cells have to be equations and one cell needs to
contain a slide bar (scrollbar). I've tried the scrollbar from the "Forms"
toolbar and from the 'Control Toolbox' with limited success.
The 'Control Toolbox' Scrollbar can be properly placed within the cell, but
I don't have access to "Properties" to change the other characteristics
(linked cell, min value, max value..). To create this control I use:

Set sbSlide = ActiveSheet.OLEObjects.Add(ClassType:="Forms.Scrol lBar.1",
Link:=False, DisplayAsIcon:=False, Left:=Leftx, Top:=Topx, Width:=Widthx,
Height:= Heightx).

(The xSizes are the target cell's values)


The 'Forms' Scrollbar allows me some control of the properties, but
placement of the Scrollbar within the cell is inconsistent, at best. For
this I used:

Set sbSlide = ActiveSheet.ScrollBars.Add(Leftx, Topx, Widthx, Heightx)

How can I create the 'Control Toolbox' scrollbox so I can modify it's
properties?
How can I accurately place the 'Forms' scrollbox?

Any suggestions? Is there anotherway to have a slidebar to allow the user
to select a value? All I need is one working solution.

Thanks,
- Pat