Points measurement problem
Hello every one,
Facing some funny problem with excel. I was adding some pictures in a sheet, which has ever worked without problem. But this time, I was stumped. Excel suddenly started adding the pictures in wrong position and wrong size. After 2 hrs of head scratching I found this. If you access HPageBreaks or VPageBreaks Property and then add the picture, the Points scale gets multiplied by 6.2571 ! Please see code below: I am using HPageBreaks.Count quite earlier in my code, then last adding some pictures. In Below code I added line x = .HPageBreaks.Count just to show my point. When this line is commented off, the pictures get added at correct position. If comment removed, the pictures get added with specidied position * 6.2571, size * 6.2571 (ineasted of size 70,70 , it adds size (438,438) Sub Dec22Presentation() With ThisWorkbook.Worksheets("Sheet1") 'x = .HPageBreaks.Count For i = 1 To 5 .Shapes.AddPicture "c:\tph5000.jpg", _ msoFalse, msoTrue, i * 200, 100, 70, 70 Next End With End Sub Any idea how to reset back the points scale? Sharad |
All times are GMT +1. The time now is 12:18 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com