I know re-posting from another forum is discouraged, but I am in a crunch for some help, and no one has responded all day on the other forum.
I am trying to assign certain max, min, incremental settings, and cell link to a scrollbar I have put on a worksheet. As this scrollbar is clicked, it should step through time at certain steps, and the cells on that same work sheet, as well as a chart, will be updated with each click of the scrollbar. I tried the below code but got an error every time I clicked the scrollbar saying "Object variable or With block variable not set":
I have also tried this, but got absolutely nothing:
Any suggestions on getting the scrollbar settings assigned? Ideally, I would like to be able to have it start at a value in cell A2 and each increment would be the value of the next cell down (A3, A4, A5, etc.) until the max is reached (A?? - amount of data in column A varies).
Since this forum doesn't allow attachments, let me know if you need the sample spreadsheet, let me know and perhaps I can email it. Thanks in advance for your help!
to be compliant with the rules, here is the link to this same question on the other forum:
http://www.excelforum.com/excel-pro...ing-settings-to-a-scrollbar-form-control.html
I am trying to assign certain max, min, incremental settings, and cell link to a scrollbar I have put on a worksheet. As this scrollbar is clicked, it should step through time at certain steps, and the cells on that same work sheet, as well as a chart, will be updated with each click of the scrollbar. I tried the below code but got an error every time I clicked the scrollbar saying "Object variable or With block variable not set":
Code:
Sub PhasorControl()
Dim Bar As ScrollBar
With Sheets("Sheet3")
Bar = Sheet3.ScrollBars("Scroll Bar 1")
Bar.Max = Sheet1.Range("D6").Value
Bar.Min = Sheet2.Range("A2").Value
End With
End Sub
Code:
Sub PhasorControl()
Sheet3.Shapes("Scroll Bar 1").ControlFormat.Min = Sheet2.Range("A2").Value
Sheet3.Shapes("Scroll Bar 1").ControlFormat.Max = Sheet1.Range("D6").Value
End Sub
Since this forum doesn't allow attachments, let me know if you need the sample spreadsheet, let me know and perhaps I can email it. Thanks in advance for your help!
to be compliant with the rules, here is the link to this same question on the other forum:
http://www.excelforum.com/excel-pro...ing-settings-to-a-scrollbar-form-control.html