Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adjust a Scroll bar to fill in a range perfectly
Hi!!!
Sorry because I do not know the english name. if you go to view/toolbox. there are many different controls. one of then is similar to the ScrollBar located in ActiveX controls, "I don't know the name anyway" my question is:" How can Adjust this "ControlBox" to fill in a range "say Range("C3:F3") perfectly. My problem comes because the Scrollbox in ActiveX controls has a property to change the resize the control size with the cells, but the "ScrollBox from the Toolbox, again this is not a ScrollBox, but looks similar, and I don't know the Englixh name, does not have this property enabled. So I need to use VBA to adjust this "ScrollBox to a Range. The Same way, if I get a Shape and or one Image, how can Adjust this images size to fill perfectly in a Range, useful if I want to adjust my company's logotipe in a Range, some Logotipes are to big others so small, I would like to create a Template, with a botton to get the image from a File and once is teken "Already done", adjust it to the range named Company_logotipe. This is the same question but for a Shape and/or image! Many Thanks!!! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adjust a Scroll bar to fill in a range perfectly
Public Sub SetScrollBar()
Dim ws As Worksheet Dim rng As Range Dim sb1 As OLEObject Set ws = ActiveSheet Set rng = ws.Range("$C$3:$F$3") Set sb1 = ws.OLEObjects("ScrollBar1") With sb1 'Set the upper-left corner of the scroll bar to the range. .Top = rng.Top .Left = rng.Left 'Now set the height and width of the scroll bar. .Height = rng.Height .Width = rng.Width End With End Sub -- Regards, Bill wrote in message m... Hi!!! Sorry because I do not know the english name. if you go to view/toolbox. there are many different controls. one of then is similar to the ScrollBar located in ActiveX controls, "I don't know the name anyway" my question is:" How can Adjust this "ControlBox" to fill in a range "say Range("C3:F3") perfectly. My problem comes because the Scrollbox in ActiveX controls has a property to change the resize the control size with the cells, but the "ScrollBox from the Toolbox, again this is not a ScrollBox, but looks similar, and I don't know the Englixh name, does not have this property enabled. So I need to use VBA to adjust this "ScrollBox to a Range. The Same way, if I get a Shape and or one Image, how can Adjust this images size to fill perfectly in a Range, useful if I want to adjust my company's logotipe in a Range, some Logotipes are to big others so small, I would like to create a Template, with a botton to get the image from a File and once is teken "Already done", adjust it to the range named Company_logotipe. This is the same question but for a Shape and/or image! Many Thanks!!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is it possible or impossible to auto adjust range in a formula? | Excel Discussion (Misc queries) | |||
excell 2003 -how to use a scroll bar to adjust the range of a func | Excel Discussion (Misc queries) | |||
adjust the range in a long column of formulas to accomodate new da | Excel Worksheet Functions | |||
How to have a chart automatically adjust range as I add data entr. | Charts and Charting in Excel | |||
Adjust Range in Function | Excel Worksheet Functions |