Orfil
New Member
I use a ranged image and a scroll bar to display text pulled from a pivot table with the OFFSET function. The macro I’ve assigned to the scroll bar looks like this:
Problem is, the code that should reset the picture size each time the scroll bar scrolls doesn't work. If I manually reset the picture size, that does work. I tried changing the Scroll event to GotFocus but that doesn't work either.
Anyone with a solution or another approach, I'd be much obliged. Thank you.
Code:
Private Sub textScroller_Change()
Application.ScreenUpdating = False
Dim ws As Worksheet
Dim shp As Shape
Set ws = Sheets("Dashboard")
Set shp = ws.Shapes("camText")
Worksheets("Calc").Rows("90:95").EntireRow.AutoFit
With shp
.LockAspectRatio = msoTrue
.ScaleHeight 1#, True, msoScaleFromTopLeft
End With
Application.ScreenUpdating = True
End Sub
Problem is, the code that should reset the picture size each time the scroll bar scrolls doesn't work. If I manually reset the picture size, that does work. I tried changing the Scroll event to GotFocus but that doesn't work either.
Anyone with a solution or another approach, I'd be much obliged. Thank you.