View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Budiono[_2_] Budiono[_2_] is offline
external usenet poster
 
Posts: 6
Default Insert Picture to Excel to specified range

thanks for your replay, but i still have diffilculties.
do you mean that sub procedure as a macro that i've to save it to .bas file?
i've save it to .bas file and then do the following code:

oWkbk.VBE.ActiveVBProject.VBComponents.Import "C:\picsize.bas" 'i've save
your code to file picsize.bas
oWkbk.Run "picsize", oSheet

but it doesn't work :(
where i can file for VBA help files?
thanks :)


"keepitcool" wrote in message
...
[b5] is short code for range("b5") on the activesheet
[sheet3!b5)=worksheets("sheet3").range("b5")

it probably doesnt work due to linebreaks or file not found.
for me the principle works in xl97 & xlxp


adjusted it would look like:

Sub Linked()
Dim s As Shape
With [a100]
Set s = .Parent.Shapes.AddPicture( _
"C:\TEMP.BMP", _
True, True, .Left, .Top, .Width, .Height)
End With
With s
.ScaleHeight 0.5, msoTrue
.ScaleWidth 0.5, msoTrue
End With
End Sub