-
Scrollbars in Powerpoint to Manipulate Embedded Excel SS
I have an embedded excel spreadsheet in power point. I want to manipulate cells in the embedded excel spreadsheet with scroll bars in powerpoint. The red scrollbar appears to work fine (it changes number in red cell), but the green scroll bar (changes number in green cell) is not working properly.
Try moving the green scroll bar a few times after you have moved the red scroll bar. File is attached.
Could someone suggest what is wrong with the code?
Thanks in advance for your help
-
Hi and welcome to VBAX
Having got your reference to the embedded sheet, you can just apply the scrollbar value to the appropriate cell[VBA]Private Sub ScrollBar1_Change()
Dim objDataSheet As Object
Set objDataSheet = Me.Shapes(2).OLEFormat.Object
objDataSheet.Worksheets(1).Cells(1, 1) = ScrollBar1.Value
Set objDataSheet = Nothing
End Sub
Private Sub ScrollBar2_Change()
Dim objDataSheet2 As Object
Set objDataSheet2 = Me.Shapes(2).OLEFormat.Object
objDataSheet2.Worksheets(1).Cells(2, 1) = ScrollBar2.Value
Set objDataSheet2 = Nothing
End Sub[/VBA]
K :-)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules