Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Scrollbar not talking to me.

I have a worksheet with 5 scrollbars on it. The following code doesn't
work. It gives me:
runtime error 424: Object required (When trying to reset the value of
scrollbar 1).


Windows("Surveys.xls").Activate
Range("Comments").Value = ""

'This next bit should work - But didn't.
ScrollBar1.Value = 0
ScrollBar2.Value = 0
ScrollBar3.Value = 0
ScrollBar4.Value = 0
ScrollBar5.Value = 0

Anyone know why?

Thanks in advance

Greg

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Scrollbar not talking to me.

If your code you are running is not in the worksheet where the controls
reside, then declare their reference prefixed with the sheet as follows

Sheets("Sheet1").ScrollBar1.Value = 0

* changed sheet name as required

--
Cheers
Nigel



"Greg Glynn" wrote in message
oups.com...
I have a worksheet with 5 scrollbars on it. The following code doesn't
work. It gives me:
runtime error 424: Object required (When trying to reset the value of
scrollbar 1).


Windows("Surveys.xls").Activate
Range("Comments").Value = ""

'This next bit should work - But didn't.
ScrollBar1.Value = 0
ScrollBar2.Value = 0
ScrollBar3.Value = 0
ScrollBar4.Value = 0
ScrollBar5.Value = 0

Anyone know why?

Thanks in advance

Greg



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Scrollbar not talking to me.

Perfect. Thanks (I knew it was something "simple").

Regards

Greg

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
Talking about difficult things¡¡¡¡ filo666 Excel Programming 3 April 30th 05 01:48 AM
scrollbar reslut makes another scrollbar to show Patrik Excel Discussion (Misc queries) 0 April 18th 05 03:11 PM
Excel and Access talking GJR3599 Excel Discussion (Misc queries) 0 March 29th 05 04:59 PM
Talking to a class or type between 2 sheets Torben Laursen Excel Programming 1 September 16th 04 12:30 PM
Talking to a Perl script hgrove[_6_] Excel Programming 0 July 20th 04 01:19 AM


All times are GMT +1. The time now is 09:38 AM.

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"