Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 167
Default Modify Scroll Bar Control Properties

I created a ScrollBar control and linked it to a cell. I also want the min
and max properties linked to a cell. I know this is not directly possible,
so I'm trying to write a Worksheet_Change event that updates the properties
when the specified cells change.

I can't figure out how to correctly set the scrollbar to an object that
gives me access to the Min and Max property. The control is of the type
MSForms.ScrollBar, but I can only figure out how to refer to it as a Shape or
a OLEObject, neither of which allow me to set the max or min properties.

Can anyone advise further? Thanks,
Pflugs
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Modify Scroll Bar Control Properties

On 25 Jul, 20:44, Pflugs wrote:
I created a ScrollBar control and linked it to a cell. I also want the min
and max properties linked to a cell. I know this is not directly possible,
so I'm trying to write a Worksheet_Change event that updates the properties
when the specified cells change.

I can't figure out how to correctly set the scrollbar to an object that
gives me access to the Min and Max property. The control is of the type
MSForms.ScrollBar, but I can only figure out how to refer to it as a Shape or
a OLEObject, neither of which allow me to set the max or min properties.

Can anyone advise further? Thanks,
Pflugs


The only way that I have been able to this is to select the object and
then change the properties as follows. I'm sure there is a more
efficient way of completing this task. Maybe someone can shed some
light.

ActiveSheet.Shapes("Scroll Bar 1").Select
Selection.Min = 1
Selection.Max = 100

Regards,

Toyin.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 167
Default Modify Scroll Bar Control Properties

That method doesn't work with ActiveX controls (from the Control Toolbox). I
am not sure if regular forms controls will work for my application.

Thanks,
Pflugs

" wrote:

On 25 Jul, 20:44, Pflugs wrote:
I created a ScrollBar control and linked it to a cell. I also want the min
and max properties linked to a cell. I know this is not directly possible,
so I'm trying to write a Worksheet_Change event that updates the properties
when the specified cells change.

I can't figure out how to correctly set the scrollbar to an object that
gives me access to the Min and Max property. The control is of the type
MSForms.ScrollBar, but I can only figure out how to refer to it as a Shape or
a OLEObject, neither of which allow me to set the max or min properties.

Can anyone advise further? Thanks,
Pflugs


The only way that I have been able to this is to select the object and
then change the properties as follows. I'm sure there is a more
efficient way of completing this task. Maybe someone can shed some
light.

ActiveSheet.Shapes("Scroll Bar 1").Select
Selection.Min = 1
Selection.Max = 100

Regards,

Toyin.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Modify Scroll Bar Control Properties

For an activeX control try the following:

Private Sub Worksheet_Change(ByVal Target As Range)
Me.ScrollBar1.Max = 1
Me.ScrollBar1.Max = 100
End Sub

nb. Remember to take switch off design mode! lol.

Regards,

Toyin.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 167
Default Modify Scroll Bar Control Properties

Oh, good grief. I can't believe it was that easy. That's just like a
userform. I suppose it would be since a sheet is an object just like a
userform.

Thanks for your help!
Pflugs

" wrote:

For an activeX control try the following:

Private Sub Worksheet_Change(ByVal Target As Range)
Me.ScrollBar1.Max = 1
Me.ScrollBar1.Max = 100
End Sub

nb. Remember to take switch off design mode! lol.

Regards,

Toyin.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Scroll Bar missing "Control" tab in "Format Properties" dialog box Peter Rooney Excel Discussion (Misc queries) 5 August 24th 06 05:36 PM
How to modify fill handle properties? ashish Excel Discussion (Misc queries) 2 March 15th 06 06:05 AM
Modify File Creation date in VBA using Document properties Peter Rooney Excel Programming 7 March 9th 06 12:33 PM
How to modify fill handle properties? sunny Excel Discussion (Misc queries) 3 March 8th 06 11:14 AM
Label Scroll Bar Properties: Make Visible? Mcasteel[_44_] Excel Programming 0 November 15th 04 02:52 PM


All times are GMT +1. The time now is 01:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"