Excel Picture manipulation in 2007

J

J Streger

I have some code that repositions a picture. The code is:

myPic.Top = .Rows(lRow).Top + (.Range(.Cells(lRow, 1), .Cells(lRow + 2,
1)).Height - _
myPic.Height) / 2

In Excel 2003, this code runs fine and positions my picture in the middle of
the range. In Excel 2007, as I loop downwards on the sheet, this code no
longer keeps the picture in the middle and the picture starts creeping up. In
fact, after only 50 rows, if I even set the picture's top = a row's top, the
picture's top will be significantly higher than the row. What was changed
between these versions to cause this? All my pictures are sized so that
neither their height or width is greater than the cell range.

Thanks all!


--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003

User of MS Office 2003
 
D

Dave Peterson

I didn't test this in xl2007, but when this kind of thing happened to me in
earlier versions, I'd make sure that the Zoom was set for 100%.

Can you test it and post back with your results?

Thanks,
 
J

J Streger

That did it. So I guess I'll have to set the zoom to 100% before doing that
type of manipulation, and then reset back to what it was afterwards.

Thank you!

--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003

User of MS Office 2003
 
D

Dave Peterson

That seems the safest route to take.

J said:
That did it. So I guess I'll have to set the zoom to 100% before doing that
type of manipulation, and then reset back to what it was afterwards.

Thank you!

--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003

User of MS Office 2003
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top