Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default ScrollBar Linking/Synching.

All,

I'm currently having trouble trying to link two scrollbars that are
part of different frames on the same multitab of a form. Basically,
when one scrolls up/down, I want the other one to scroll up/down
accordingly (and for this to be invisible to the user).

My main problem is probably not being able to access any of the
properties of the scrollbars themselves. I've tried capturing the
ScrollBar1_Change event, but nothing happens. I've tried the following
code to at least loop through them all so I have some names to work
off, but it doesn't like the For Each line (object doesn't support this
property or method error):

Sub ScrollFinder()

Dim myScroll As ScrollBar
For Each myScroll In WeightForm
MsgBox myScroll.Name
Next

End Sub

How do I access the scrollbars that are part of a frame? I've tried
working through the objects (e.g.
WeightForm.Tabs.AMTab.AMAppTab.AMAppFrame2.ScrollB ar1.Name) but none of
it seems to work. Are there issues with programmatically changing
scrollbars that are part of a frame/multitab?

Many thanks for any help you can offer,

Ross.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default ScrollBar Linking/Synching.

The fact that the scroll bars are on different pages and/or frames etc
should not make any difference :

Private Sub ScrollBar1_Change()
ScrollBar2.Value = ScrollBar1.Value
End Sub

Private Sub ScrollBar2_Change()
ScrollBar1.Value = ScrollBar2.Value
End Sub

Ensure you do not create an endless loop though, by continually changing
both vales.

NickHK

"Rawce" wrote in message
oups.com...
All,

I'm currently having trouble trying to link two scrollbars that are
part of different frames on the same multitab of a form. Basically,
when one scrolls up/down, I want the other one to scroll up/down
accordingly (and for this to be invisible to the user).

My main problem is probably not being able to access any of the
properties of the scrollbars themselves. I've tried capturing the
ScrollBar1_Change event, but nothing happens. I've tried the following
code to at least loop through them all so I have some names to work
off, but it doesn't like the For Each line (object doesn't support this
property or method error):

Sub ScrollFinder()

Dim myScroll As ScrollBar
For Each myScroll In WeightForm
MsgBox myScroll.Name
Next

End Sub

How do I access the scrollbars that are part of a frame? I've tried
working through the objects (e.g.
WeightForm.Tabs.AMTab.AMAppTab.AMAppFrame2.ScrollB ar1.Name) but none of
it seems to work. Are there issues with programmatically changing
scrollbars that are part of a frame/multitab?

Many thanks for any help you can offer,

Ross.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default ScrollBar Linking/Synching.

Thanks. I tried ScrollBarX_Change() previously with no joy. However, I
believe that my problem may be related to using the frame's own
scrollbar (fmScrollBarVisible, etc. from the Properties window). What I
think I should probably do is add a separate scrollbar (added from the
toolbox) and use the _Change() to move the scroll height of the frame,
therefore not using the frame's own scrollbar at all. I can therefore
also move both frames using one dedicated scrollbar.

I'll let you know how I get on, but thanks for your help anyway; the
..Value will come in handy with all this.

Cheers,

Ross.

NickHK wrote:
The fact that the scroll bars are on different pages and/or frames etc
should not make any difference :

Private Sub ScrollBar1_Change()
ScrollBar2.Value = ScrollBar1.Value
End Sub

Private Sub ScrollBar2_Change()
ScrollBar1.Value = ScrollBar2.Value
End Sub

Ensure you do not create an endless loop though, by continually changing
both vales.

NickHK

"Rawce" wrote in message
oups.com...
All,

I'm currently having trouble trying to link two scrollbars that are
part of different frames on the same multitab of a form. Basically,
when one scrolls up/down, I want the other one to scroll up/down
accordingly (and for this to be invisible to the user).

My main problem is probably not being able to access any of the
properties of the scrollbars themselves. I've tried capturing the
ScrollBar1_Change event, but nothing happens. I've tried the following
code to at least loop through them all so I have some names to work
off, but it doesn't like the For Each line (object doesn't support this
property or method error):

Sub ScrollFinder()

Dim myScroll As ScrollBar
For Each myScroll In WeightForm
MsgBox myScroll.Name
Next

End Sub

How do I access the scrollbars that are part of a frame? I've tried
working through the objects (e.g.
WeightForm.Tabs.AMTab.AMAppTab.AMAppFrame2.ScrollB ar1.Name) but none of
it seems to work. Are there issues with programmatically changing
scrollbars that are part of a frame/multitab?

Many thanks for any help you can offer,

Ross.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default ScrollBar Linking/Synching.

OK, if you are using the frame's built in scroll bars, you need to play its
..ScrollHeight, .ScrollLeft, etc properties.
You have the FrameX_Scroll event to trigger your code.

NickHK

"Rawce" wrote in message
oups.com...
Thanks. I tried ScrollBarX_Change() previously with no joy. However, I
believe that my problem may be related to using the frame's own
scrollbar (fmScrollBarVisible, etc. from the Properties window). What I
think I should probably do is add a separate scrollbar (added from the
toolbox) and use the _Change() to move the scroll height of the frame,
therefore not using the frame's own scrollbar at all. I can therefore
also move both frames using one dedicated scrollbar.

I'll let you know how I get on, but thanks for your help anyway; the
.Value will come in handy with all this.

Cheers,

Ross.

NickHK wrote:
The fact that the scroll bars are on different pages and/or frames etc
should not make any difference :

Private Sub ScrollBar1_Change()
ScrollBar2.Value = ScrollBar1.Value
End Sub

Private Sub ScrollBar2_Change()
ScrollBar1.Value = ScrollBar2.Value
End Sub

Ensure you do not create an endless loop though, by continually changing
both vales.

NickHK

"Rawce" wrote in message
oups.com...
All,

I'm currently having trouble trying to link two scrollbars that are
part of different frames on the same multitab of a form. Basically,
when one scrolls up/down, I want the other one to scroll up/down
accordingly (and for this to be invisible to the user).

My main problem is probably not being able to access any of the
properties of the scrollbars themselves. I've tried capturing the
ScrollBar1_Change event, but nothing happens. I've tried the following
code to at least loop through them all so I have some names to work
off, but it doesn't like the For Each line (object doesn't support

this
property or method error):

Sub ScrollFinder()

Dim myScroll As ScrollBar
For Each myScroll In WeightForm
MsgBox myScroll.Name
Next

End Sub

How do I access the scrollbars that are part of a frame? I've tried
working through the objects (e.g.
WeightForm.Tabs.AMTab.AMAppTab.AMAppFrame2.ScrollB ar1.Name) but none

of
it seems to work. Are there issues with programmatically changing
scrollbars that are part of a frame/multitab?

Many thanks for any help you can offer,

Ross.




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default ScrollBar Linking/Synching.

Thanks for looking. Finally solved it using the method I mentioned
above (a separate scrollbar, linking the two frames by code within the
_Change event).

Cheers anyway,

Ross.

NickHK wrote:
OK, if you are using the frame's built in scroll bars, you need to play its
.ScrollHeight, .ScrollLeft, etc properties.
You have the FrameX_Scroll event to trigger your code.

NickHK

"Rawce" wrote in message
oups.com...
Thanks. I tried ScrollBarX_Change() previously with no joy. However, I
believe that my problem may be related to using the frame's own
scrollbar (fmScrollBarVisible, etc. from the Properties window). What I
think I should probably do is add a separate scrollbar (added from the
toolbox) and use the _Change() to move the scroll height of the frame,
therefore not using the frame's own scrollbar at all. I can therefore
also move both frames using one dedicated scrollbar.

I'll let you know how I get on, but thanks for your help anyway; the
.Value will come in handy with all this.

Cheers,

Ross.

NickHK wrote:
The fact that the scroll bars are on different pages and/or frames etc
should not make any difference :

Private Sub ScrollBar1_Change()
ScrollBar2.Value = ScrollBar1.Value
End Sub

Private Sub ScrollBar2_Change()
ScrollBar1.Value = ScrollBar2.Value
End Sub

Ensure you do not create an endless loop though, by continually changing
both vales.

NickHK

"Rawce" wrote in message
oups.com...
All,

I'm currently having trouble trying to link two scrollbars that are
part of different frames on the same multitab of a form. Basically,
when one scrolls up/down, I want the other one to scroll up/down
accordingly (and for this to be invisible to the user).

My main problem is probably not being able to access any of the
properties of the scrollbars themselves. I've tried capturing the
ScrollBar1_Change event, but nothing happens. I've tried the following
code to at least loop through them all so I have some names to work
off, but it doesn't like the For Each line (object doesn't support

this
property or method error):

Sub ScrollFinder()

Dim myScroll As ScrollBar
For Each myScroll In WeightForm
MsgBox myScroll.Name
Next

End Sub

How do I access the scrollbars that are part of a frame? I've tried
working through the objects (e.g.
WeightForm.Tabs.AMTab.AMAppTab.AMAppFrame2.ScrollB ar1.Name) but none

of
it seems to work. Are there issues with programmatically changing
scrollbars that are part of a frame/multitab?

Many thanks for any help you can offer,

Ross.





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
Synching worksheets in same workbook jaketollman Excel Discussion (Misc queries) 1 July 28th 08 06:40 PM
Hyperlinks break when synching from Pocket Excel rev_cletus Links and Linking in Excel 0 June 1st 06 03:32 PM
synching two lists BorisS Excel Programming 2 September 20th 05 02:46 AM
scrollbar reslut makes another scrollbar to show Patrik Excel Discussion (Misc queries) 0 April 18th 05 03:11 PM
Scrollbar junx13[_11_] Excel Programming 0 September 20th 04 08:03 AM


All times are GMT +1. The time now is 07: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"