PREVIEW IN USERORM

  • Thread starter Thread starter GUS
  • Start date Start date
G

GUS

I have a large sheet (80 columns,160 rows) which probably don't fit in user
screen , so i want something to work as navigator to the sheet.
I thought probably a modeless userform with small sheet preview inside it
..
If that's possible then after clicking to the desired area (in the userform
of course) the sheet can scroll in that area (probably with cell select or
scroll).
Can this be done ?
 
Hi Gus,
I have a large sheet (80 columns,160 rows) which probably don't fit in user
screen , so i want something to work as navigator to the sheet.
I thought probably a modeless userform with small sheet preview inside it
..
If that's possible then after clicking to the desired area (in the userform
of course) the sheet can scroll in that area (probably with cell select or
scroll).
Can this be done ?

Good question. Of the top of my head, you'd need to do the following:

1. Copy the usedrange as a picture
2. Use the PastePicture routine from my web site to copy that to a Picture
control on the userform.
3. Hook the MouseDown event of the Picture control (which gives the x,y
coordinates of the pointer) to identify where they user clicked and move
there.
4. Hook the Userform_Active event to refresh the display of the sheet as the
user reactives the form (which might have the unfortunate side-effect of
clearing the clipboard).

Regards

Stephen Bullen
Microsoft MVP - Excel
www.BMSLtd.co.uk
 
Back
Top