Suppose a user?s last selection on a sheet is somewhere on column ?FF? . Then the user moves the screen left using the scrool bar so that now he is looking at column ?G?. He has done nothing to cause a selection to occur on the screen he is now looking at. However my macro needs to know where on the sheet the user is now looking. My macro thinks the user is positioned at column ?FF? since that?s where the last selection occurred. My macro will perform an action that depends on where the user is looking on the sheet, so the action will be incorrect.
The macro execution is initiated when the user clicks on a button (not a cell), which is one of many scattered around the sheet. The macro thinks the user has clicked on the buitton located near column ?FF?, when in fact the user has clicked on the button near column ?G?.
How can my macro determine where the screen is positioned on the sheet? I seem to recall that there is a property that will tell you the coordinates of the upper left corner being displayed at any given moment, but I can?t for the life of me remember what that property is called. Since the user has not done anything to the sheet after he moved it to a different viewing area, what is available to tell the macro where the user is now looking?