Right Hand Column on Screen

T

Tim Childs

Hi

Can someone give me the code snippet to give the column
number of the the column which is at the far right of the
screen itself i.e. the returned result will change if the
zoom factor of the display is changed.

Thanks

Tim
 
T

Tom Ogilvy

Sub FindColumn()
Dim rng As Range
Set rng = ActiveWindow.VisibleRange
Set rng = rng.Columns(rng.Columns.Count)
MsgBox rng.Address
End Sub
 
Top