06-11-2008, 05:48 PM
I am in the final stretch here.
Everything works great 'except' (you was waiting for that, wasnt ya?), for newly copied worksheets. They all have 2 images ( 1 top left, 1 top right). The new copies display the images larger then they should. The only way I can get them to display right is to zoom 100%. Using vba, I tried using the .zoom function, didnt work. Maybe I am using it wrong.
They all have 2 images
What sort of images? How did they get there (e.g. Insert->Picture)?
The new copies display the images larger then they should. The only way I can get them to display right is to zoom 100%.
Do you mean the images are too large in relation to the cells, or that the whole worksheet is displayed at the wrong magnification? Zoom affects everything, so I don't think this is going to be what you want...
06-11-2008, 06:08 PM
I believe it is: insert -> picture
I kinda figured out the cause and a fix.
I keep my worksheets zoom at 75%. When I use the copy function, it copies the sheet and displays the new copy at 75%. For some reason the images at not scaling down. They are displaying as if the sheet was at 100% zoom. So the images look larger becuase the sheet is at 75% and the images are at 100%. If you change zoom to 100%, then the sheet matches up with the images. Then you can reset the sheet back to 75%.
The work around, (if it can be called that), is to set the zoom of the page I am going to copy to 100%. I am working on using vba to zoom the new sheet to 75%.
I can't reproduce the behaviour you describe - but since it's clearly a bug, it's not surprising that it would be version-dependent. Using the macro recorder, it seems that one sets the zoom of a window, not that of a sheet. You can access the existing windows using ThisWorkbook.Windows or, in most cases, simply by using ActiveWindow. Does that help?
06-11-2008, 06:30 PM
Well, I ended up using this:
Sheets(sSheet).Activate = msoTrue
ActiveWindow.Zoom = 75
'Do some stuff
'Do some more stuff
Sheets("Setup").Activate = msoTrue
change zoom for the sheet and reactive my current sheet.