ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to move pictures to the center of window? (https://www.excelbanter.com/excel-programming/371528-how-move-pictures-center-window.html)

tskogstrom

How to move pictures to the center of window?
 
Hi,
Earlier, I pasted one splash picture to the activesheet on Range ("A1")
and then to get it into the middle of the window I ran the code:
ActiveSheet.Shapes("PIC_WAIT_" & picNo).IncrementLeft
(Range(ActiveWindow.VisibleRange.Address).Columns. Width / 2) - PicWd /
2
ActiveSheet.Shapes("PIC_WAIT_" & picNo).IncrementTop
(Range(ActiveWindow.VisibleRange.Address).Rows.Hei ght / 2) - PicHt / 2

....where picNo of cource is the ID of the progress etc.


Now,
I don't want to run paste/delete (it kill the clipboard content). I'm
planning to have hidden progress bar pictures hidden on the sheets and
just make each after each visible.

Sice the zoom/display size and scrollings always can be different, I
need a good way of move the 10 progress pictures in the middle of the
current excel window.
Any ideas?


Further, can you see any problems with having hidden progress pics on
each sheet? (I will have the workbook and worksheet locked for the
user)

/Kind regards
tysk


Tom Ogilvy

How to move pictures to the center of window?
 
Personaly I would look at something like this as John Walkenbach's site,

http://www.j-walk.com/ss/excel/tips/tip34.htm

--
Regards,
Tom Ogilvy


"tskogstrom" wrote in message
oups.com...
Hi,
Earlier, I pasted one splash picture to the activesheet on Range ("A1")
and then to get it into the middle of the window I ran the code:
ActiveSheet.Shapes("PIC_WAIT_" & picNo).IncrementLeft
(Range(ActiveWindow.VisibleRange.Address).Columns. Width / 2) - PicWd /
2
ActiveSheet.Shapes("PIC_WAIT_" & picNo).IncrementTop
(Range(ActiveWindow.VisibleRange.Address).Rows.Hei ght / 2) - PicHt / 2

...where picNo of cource is the ID of the progress etc.


Now,
I don't want to run paste/delete (it kill the clipboard content). I'm
planning to have hidden progress bar pictures hidden on the sheets and
just make each after each visible.

Sice the zoom/display size and scrollings always can be different, I
need a good way of move the 10 progress pictures in the middle of the
current excel window.
Any ideas?


Further, can you see any problems with having hidden progress pics on
each sheet? (I will have the workbook and worksheet locked for the
user)

/Kind regards
tysk





All times are GMT +1. The time now is 10:48 AM.

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