Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 09-20-2018, 11:52 AM
Logit Logit is offline Stop Macro button moving with cells Windows 10 Stop Macro button moving with cells Office 2007
Expert
 
Join Date: Jan 2017
Posts: 591
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

.
Here is another. It is called from ThisWorkbook_Open module. You should also
close it in ThisWorkbook_BeforeClose module ...

Code:
Option Explicit

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 Sub
Attached Files
File Type: xlsm Button Follow While Scrolling.xlsm (21.1 KB, 11 views)
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I stop check boxes moving rows when text wraps in an adjacent cell? PatrickYork Excel 2 04-04-2018 11:23 AM
Stop Macro button moving with cells Cannot get macro button to sort with merged cells on sheet lonniepoet Excel Programming 3 02-04-2016 04:33 PM
data in some cells moving Sherriann Excel 1 08-07-2013 06:52 AM
Stop Macro button moving with cells How to stop letter body moving up and down alankempster Mail Merge 2 09-13-2012 08:09 AM
Stop Macro button moving with cells Moving formula range multiple cells when moving sum over one cell FraserKitchell Excel 4 02-26-2010 10:38 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:12 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft