Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Excel Picture manipulation in 2007

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Excel Picture manipulation in 2007

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 Streger wrote:

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


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Excel Picture manipulation in 2007

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



"Dave Peterson" wrote:

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 Streger wrote:

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


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Excel Picture manipulation in 2007

That seems the safest route to take.

J Streger wrote:

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

"Dave Peterson" wrote:

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 Streger wrote:

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


--

Dave Peterson


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I embed a picture in excel 2007 Bob from ATK Excel Discussion (Misc queries) 0 September 21st 09 01:31 PM
Copy Picture in Excel 2007 Bob Myers Excel Worksheet Functions 5 December 21st 08 11:03 PM
picture graph in Excel 2007 K -- mom of 3 Charts and Charting in Excel 1 April 27th 07 01:20 PM
how to add picture to worksheet from url in Excel 2007 qyang Excel Programming 5 December 5th 06 06:25 AM
For better Performance in VBA for Excel - Strings manipulation OR Objects manipulation vmegha Excel Programming 2 December 19th 05 12:14 AM


All times are GMT +1. The time now is 07:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"