Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.excel.programming > #108022
| From | isabelle <i@v.invalid> |
|---|---|
| Newsgroups | microsoft.public.excel.programming |
| Subject | Re: Excel - Macro to Insert Picture |
| Date | 2015-09-21 18:10 -0400 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <mtpv92$d82$2@speranza.aioe.org> (permalink) |
| References | <50819221-1efd-48bc-b551-f86b84ee3212@googlegroups.com> <mtfapr$heq$1@speranza.aioe.org> <565ef1e0-cd40-438f-9cce-34700ab9fe7a@googlegroups.com> |
hi,
yes, replace
Set MyObj = ActiveSheet.Shapes.AddPicture(myPicture, False, True, 1, 1, 1, 1)
by
Set MyObj = ActiveSheet.Shapes.AddPicture(myPicture, False, True, 1, 1, 100, 100)
isabelle
Le 2015-09-21 15:26, marc7474@excite.com a écrit :
> Hi Isabelle,
>
> It seems that your suggestion will work but another issues came up when I
> tried it. Inserting the picture worked fine & the picture size is fine but
> when it inserted the picture it zooms to a point where the picture is
> unrecognizable, cannot really see what the picture is, it's zoomed in so
> much. Anyway to fix this?
>
> Thanks,
>
>
> On Thursday, September 17, 2015 at 2:20:11 PM UTC-7, isabelle wrote:
>> hi Marc,
>>
>> try with Shapes.AddPicture
>>
>> Set MyObj = ActiveSheet.Shapes.AddPicture(myPicture, False, True, 1, 1, 1,
>> 1) With MyObj .LockAspectRatio = False .Height = 170 .Width = 200 .Left =
>> .Left + 2 .Top = .Top + 12 .Placement = xlMoveAndSize End With
>>
>> isabelle
>>
>
>>> I Have the following Macro to insert Picture in excel form, it worked
>>> fine in older version Excel & in 2013 version it still works but instead
>>> of Inserting the picture it seems that excel is just inserting the link,
>>> if the picture location is changed the form does not show the picture any
>>> more, I need to be able to Insert the picture in the form & not just the
>>> link to the picture.
>>>
>>> Any help is appreciated to fix this macro. + Thanks.
>>>
>>> *********************************************** Sub InsertPicture()
>>>
>>> Dim myPicture As String, MyObj As Object
>>>
>>> Range("A14").Select
>>>
>>> myPicture = Application.GetOpenFilename _ ("Pictures (*.gif; *.jpg;
>>> *.bmp; *.tif),*.gif; *.jpg; *.bmp; *.tif", _ , "Select Picture to
>>> Import")
>>>
>>> If myPicture = "False" Then Exit Sub
>>>
>>> Application.ScreenUpdating = False
>>>
>>> Set MyObj = ActiveSheet.Pictures.Insert(myPicture) With MyObj With
>>> .ShapeRange .LockAspectRatio = False .Height = 170 .Width = 200 .Left =
>>> .Left + 2 .Top = .Top + 12
>>>
>>> End With .Placement = xlMoveAndSize End With
>>>
>>> Set MyObj = Nothing Application.ScreenUpdating = True
>>>
>>> End Sub ************************************************
>>>
>
Back to microsoft.public.excel.programming | Previous | Next — Previous in thread | Find similar | Unroll thread
Excel - Macro to Insert Picture marc7474@excite.com - 2015-09-15 12:37 -0700
Re: Excel - Macro to Insert Picture isabelle <i@v.invalid> - 2015-09-17 17:20 -0400
Re: Excel - Macro to Insert Picture marc7474@excite.com - 2015-09-21 12:26 -0700
Re: Excel - Macro to Insert Picture GS <gs@v.invalid> - 2015-09-21 15:58 -0400
Re: Excel - Macro to Insert Picture isabelle <i@v.invalid> - 2015-09-21 18:10 -0400
csiph-web