View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nigel Nigel is offline
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