Insert picture, resize to specific width, keeping height propo
Floating Point means decimal point.
So, if you want to use decimal point you can choose between:
double and single
if you want to have whole numbers you can choose between all the rest
(including single and double)
Hope that I spoke in lay terms, as I am also a lay ;)
For your Resize sub you can shorten it to:
----------------------------------------------------------
SUMFB.Activate
'i'm not sure, if you really need to select this cell!
SUMFB.Cells(15, 16).Select '''VARIABLE PRM
Set pSketch = SUMFB.Pictures.Insert("C:\Documents and Settings\Olab\My
Documents\0- Wear Testing\Sketches\" & sStyle & ".jpg") '''VARIABLE PRM
With pSketch
PicRatio = .Width / .Height
.Width = 240
.Height = .Width * PicRatio
'not sure, what you want to achieve with the following line
.Top = .Top - .Height + 1
End With
----------------------------------------------------------
hth
Carlo
"justme" wrote:
Hi Carlo,
thank you for your reply, but like I said, I already read the vba help
summary and I really don't understand the terms used like "floating point",
etc. etc.
I was hoping for someone could explain in lay terms the difference between
the different data types that allow decimals.
p.s. in case anyone is pays attention to my picture resizing sub where you
only know the width, I caught a boo boo and here's the revised sub:
SUMFB.Activate
SUMFB.Cells(15, 16).Select '''VARIABLE PRM
Set pSketch = SUMFB.Pictures.Insert("C:\Documents and Settings\Olab\My
Documents\0- Wear Testing\Sketches\" & sStyle & ".jpg") '''VARIABLE PRM
With pSketch
PicHt = .Height
PicWd = .Width
.Select
.Width = 240
PicRatio = .Width / PicWd
.Height = PicHt * PicRatio
.Top = .Top - .Height + 1
End With
|