Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-14-2018, 07:02 AM
Guzziguy Guzziguy is offline Locking a button postion so that it doesn't scroll with the worksheet Windows 7 32bit Locking a button postion so that it doesn't scroll with the worksheet Office 2010 32bit
Novice
Locking a button postion so that it doesn't scroll with the worksheet
 
Join Date: Oct 2012
Posts: 5
Guzziguy is on a distinguished road
Default Locking a button postion so that it doesn't scroll with the worksheet

Is there a way to lock an Activex CommandButton in a specific position so that it doesn't scroll with the underlying worksheet; for example place the button in the middle of the screen and make it remain there whilst the worksheet is scrolled horizontally or vertically behind it?



I could do it with Freeze Panes but I'd rather have the entire screen scrollable.
Reply With Quote
  #2  
Old 03-14-2018, 08:27 AM
Logit Logit is offline Locking a button postion so that it doesn't scroll with the worksheet Windows 10 Locking a button postion so that it doesn't scroll with the worksheet Office 2007
Expert
 
Join Date: Jan 2017
Posts: 533
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

.
Paste into a Routine 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
Pate into the ThisWorkbook module :

Code:
Option Explicit

Private Sub Workbook_BeforeClose(Cancel As Boolean)
StopTimer
End Sub

Private Sub Workbook_Open()
StartTimedRefresh
End Sub
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Locking a button postion so that it doesn't scroll with the worksheet Microsoft Word doesn't scroll with my typing like I'd want muiy Word 5 05-02-2023 06:14 PM
Locking a button postion so that it doesn't scroll with the worksheet Word doesn't scroll to bottom of page otuatail Word 15 02-25-2017 07:14 AM
Activate Worksheet with button in Excel 2013 JTS Excel 1 08-25-2013 12:02 AM
Page does not actively scroll with click, hold and drag on scroll-bar jbax Word 1 05-09-2013 07:16 PM
Insert table button doesn't work in Outlook 2010 e-mail message ironwoods Outlook 0 08-02-2010 12:24 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:58 AM.


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