Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I use following lines to import two pictures into a worksheet:
With ActiveSheet.Pictures .Insert ("http://www.abc.com/picture1.jpg") .Insert ("http://www.abc.com/picture2.jpg") End With Both pictures are too big; also the placement of the pictures is rather haphazard. Would appreciate it if someone could me how to: - place picture1 somewhere near to cell A1 and picture2 near to cell A20. - resize height of picture1 to 3 inches - resize width of picture2 to 4 inches TIA. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This kind of thing works ok when I import a picture from my harddrive--I've
never used it for web sites: Option Explicit Sub testme02() Dim myPicNames As Variant Dim myPict As Picture Dim myAddresses As Variant Dim myRng As Range Dim iCtr As Long myPicNames = Array("c:\pict1.jpg", _ "C:\pict2.jpg") myAddresses = Array("a1:c3", "e1:g3") If UBound(myPicNames) < UBound(myAddresses) Then MsgBox "design error" Exit Sub End If With Worksheets("sheet1") For iCtr = LBound(myPicNames) To UBound(myPicNames) Set myRng = .Range(myAddresses(iCtr)) Set myPict = .Pictures.Insert(myPicNames(iCtr)) myPict.Top = myRng.Top myPict.Width = myRng.Width myPict.Height = myRng.Height myPict.Left = myRng.Left myPict.Placement = xlMoveAndSize Next iCtr End With End Sub Shatin wrote: I use following lines to import two pictures into a worksheet: With ActiveSheet.Pictures .Insert ("http://www.abc.com/picture1.jpg") .Insert ("http://www.abc.com/picture2.jpg") End With Both pictures are too big; also the placement of the pictures is rather haphazard. Would appreciate it if someone could me how to: - place picture1 somewhere near to cell A1 and picture2 near to cell A20. - resize height of picture1 to 3 inches - resize width of picture2 to 4 inches TIA. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Connect a number to a picture bank and import that picture to exce | Excel Discussion (Misc queries) | |||
import XML data...Is there a size limit on the import? | Excel Discussion (Misc queries) | |||
Picture Placement | Excel Discussion (Misc queries) | |||
copy charts & paste as picture, hide chart, size & place same picture as chart | Excel Programming | |||
Questions of Great Import | Excel Programming |