ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   PREVIEW IN USERORM (https://www.excelbanter.com/excel-programming/276390-preview-userorm.html)

GUS

PREVIEW IN USERORM
 
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 ?



Stephen Bullen

PREVIEW IN USERORM
 
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



All times are GMT +1. The time now is 06:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com