Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Dim iLeftColumn As Integer
Dim rLeftColumn As Range
Dim iTopRow As Integer
Dim rTopRow As Range
Dim NewLeft As Double
Dim NewTop As Double
iLeftColumn = ActiveWindow.ScrollColumn
Set rLeftColumn = Columns(iLeftColumn)
iTopRow = ActiveWindow.ScrollRow
Set rTopRow = Rows(iTopRow)
NewLeft = rLeftColumn.Left + _
((ActiveCell.Left + ActiveCell.Width) - _
(rLeftColumn.Left + ActiveWindow.Width))
If NewLeft < 0 Then NewLeft = 0
NewTop = rTopRow.Top + _
((ActiveCell.Top + ActiveCell.Height) - _
(rTopRow.Top + ActiveWindow.Height))
If NewTop < 0 Then NewTop = 0
'Debug.Print rLeftColumn.Left
'Debug.Print rTopRow.Top
'
'Debug.Print NewLeft
'Debug.Print NewTop
ActiveWindow.ScrollIntoView _
Left:=NewLeft, Top:=NewTop, _
Width:=NewLeft, Height:=NewTop