Excel 2007 Cell Top Properties can't match with Picture Top Proper

  • Thread starter Excel 2007 Top Properties Problem
  • Start date
E

Excel 2007 Top Properties Problem

When I am writing VBA in Excel 2007 Worksheet, I want to generate a
spreadsheet that contains some product items with Picture. So I will work as
follow:

Set
oPic=Application.ActiveSheet.Cells(iRow,iCol+1).Worksheet.Pictures.Insert(sfile)
oPic.Height = Application.InchesToPoints(1.1)
oPic.Width = Application.InchesToPoints(1.1)
Application.ActiveSheet.Cells(iRow, 1).RowHeight = oPic.Height + 5
oPic.Top = Application.ActiveSheet.Cells(iRow, iCol + 1).Top + 10
oPic.Left = Application.ActiveSheet.Cells(iRow, iCol + 1).Left + 5

But never can match the correct top properties. Can't insert picture to the
correct place. I have used the Pivottable inside this spreadsheet. Use the
data to get the image from SQL Server and File Image Server and also I have
already updated to Office 2007 SP1 and also can't solved.

I have tried to test the VBA code. Directly copy the pivottable and VBA
code to Excel 2000 / 2003, it has perfectly work.
 

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

Similar Threads


Top