Small problem with VBA

  Chas49 12:57 31 May 2010
Locked

Sheet1 has code attached to it via a button. When the code has executed, the last item ( Range("A1".select) does indeed select that cell - but - if the that cell is not visible (say the screen is showing cell rows 50 to 70 for example) the screen does not scroll automatically up to A1.

Clearly I am not setting the right code to do that - help would be appreciated in putting that right.

  reddwarfcrew 20:21 31 May 2010

try either:

ActiveWindow.ScrollRow = 1

or:
Application.Goto Range("A1"), scroll:=True

  Chas49 22:54 31 May 2010

reddwarfcrew:

I'll try your suggestions tomorrow - I think you have it! I'll post as soon as I get the chance.

Thanks very much.

  Chas49 23:23 31 May 2010

It worked a treat reddwarfcrew, thanks again

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Galaxy Note 8 vs iPhone X

Aardman's new YouTube channel to share the work of independent animators

iPhone X vs Samsung Galaxy Note 8

Les meilleurs navigateurs internet 2017