excel vba how to make shape visible while scrolling excel vba how to make shape visible while scrolling excel vba how to make shape visible while scrolling

The solution for “excel vba how to make shape visible while scrolling excel vba how to make shape visible while scrolling excel vba how to make shape visible while scrolling” can be found here. The following code will assist you in solving the problem.

Private eTime
Sub ScreenRefresh()
With ThisWorkbook.Worksheets(“Sheet1”).Shapes(1)
.Left = ThisWorkbook.Windows(1).VisibleRange(2, 2).Left
.Top = ThisWorkbook.Windows(1).VisibleRange(2, 2).Top
End With
End Sub

Sub StartTimedRefresh()
Call ScreenRefresh
eTime = Now + TimeValue(“00:00:01”)
Application.OnTime eTime, “StartTimedRefresh”
End Sub

Sub StopTimer()
Application.OnTime eTime, “StartTimedRefresh”, , False
End SubPrivate Sub Worksheet_SelectionChange(ByVal Target As Range)

With ActiveSheet.Shapes(1)

.Left = ActiveWindow.VisibleRange(2, 2).Left
.Top = ActiveWindow.VisibleRange(2, 2).Top

End With

End SubPrivate Sub Worksheet_Activate()
Call StartTimedRefresh
End Sub

Private Sub Worksheet_Deactivate()
Call StopTimer
End Sub

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

Similar Posts