Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Inserting a picture

Hi Tom,
I thought I tried that but obviously I didn't. It worked. Thanks for
taking time to respond. You and your mates are a terrific resource.

"Tom Ogilvy" wrote:

If
ActiveChart.Pictures.Insert (FilePath).select

works for the insertion,

then

ActiveChart.Pictures.Insert FilePath

without the select and ( ) should work

--
Regards,
Tom Ogilvy





"RLang" wrote:

Hi Tom,
The command line that works to insert a picture is as follows:

ActiveChart.Pictures.Insert (FilePath).select

I can then position the picture, in code, wherever I want depending on the
current x,y position of the plot point selected.

Problem is the ".select" portion takes the focus away from the user
successively selecting other individual plot points. i.e. they end up having
to re-click the series, then re-click on an individual point in the series.
My code is trapping the event where a single plot point is selected and I
delete the previous picture and insert a new one depending on which point is
selected. I want to have the operation as smooth as possible. I know how to
delete the previous picture when a new point is selected. The
"Pictures.Insert" command doesn't require me to specify width, height, and
position coordinates at the time of the function call like the following
command:

ActiveChart.Shapes.AddPicture ThePath, False, True, LeftPos, TopPos, Width,
Height

My picture widths and heights vary so I don't know the aspect ratio ahead of
time. The overall sizes are sufficiently small so I can live with the
default insertion size as is.


"Tom Ogilvy" wrote:

show the section of the code that is causing problems.

--
Regards,
Tom Ogilvy


"RLang" wrote:

Hi,
I'm writing a macro to insert a picture either on the spreadsheet or in
the window of an embedded chart. When I record the macro for inserting a
picture, the command line ends with a .select. I get an error if I remove
the .select from the command line. Based on some other stuff I'm doing, the
"select" part of the command line is taking the focus away from the other
activity. Can you give me some advice for how to insert a picture (without
pre-specifying the image dimensions ala Shapes.AddPicture command) accepting
the "default" incoming image dimensions?

Thanks much.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting a Picture using Cell as picture name. the-jackal Links and Linking in Excel 12 November 10th 08 09:21 AM
Inserting a picture Boban76 Excel Discussion (Misc queries) 2 July 19th 06 02:56 PM
Inserting a picture comotoman Excel Discussion (Misc queries) 3 October 16th 05 02:02 PM
Inserting Picture LMB New Users to Excel 1 October 2nd 05 11:02 PM
get a picture width and height without inserting the picture Dorothy Excel Programming 1 January 13th 05 05:06 AM


All times are GMT +1. The time now is 03:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"