Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Simple Insert Picture question

If I record a macro, it looks like this:

ActiveSheet.Pictures.Insert("C:\Photos\3078.JPG"). Select

Obviously, I want to make the "3078.JPG" a variable that
I create by selecting a cell from a list of many JPGs. I
tried:

AAA=Activecell.Value
ActiveSheet.Pictures.Insert("C:\Photos\" & AAA

I also tried ActiveSheet.Pictures.Insert
Filename="C:\Photos\" & AAA

Neither worked. I must be getting the syntax wrong.

TIA
paul





  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default Simple Insert Picture question

Paul,

Both of these work for me

AAA = ActiveCell.Value
ActiveSheet.Pictures.Insert Filename:="C:\Photos\" & AAA

AAA = ActiveCell.Value
ActiveSheet.Pictures.Insert "C:\Photos\" & AAA

Are you sure you are including the .jpg in the cell value?

--

HTH

Bob Phillips

"Paul" wrote in message
...
If I record a macro, it looks like this:

ActiveSheet.Pictures.Insert("C:\Photos\3078.JPG"). Select

Obviously, I want to make the "3078.JPG" a variable that
I create by selecting a cell from a list of many JPGs. I
tried:

AAA=Activecell.Value
ActiveSheet.Pictures.Insert("C:\Photos\" & AAA

I also tried ActiveSheet.Pictures.Insert
Filename="C:\Photos\" & AAA

Neither worked. I must be getting the syntax wrong.

TIA
paul







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
IF formula-simple question; simple operator Rich D Excel Discussion (Misc queries) 4 December 6th 07 03:36 PM
how do I insert picture into cell so vlookup can return picture? ah Excel Worksheet Functions 1 May 1st 07 04:38 AM
insert a picture in to a comment but picture not save on hard disk Pablo Excel Discussion (Misc queries) 0 February 21st 07 03:48 PM
Simple Simple Excel usage question BookerW Excel Discussion (Misc queries) 1 June 23rd 05 10:06 PM
insert picture BillGwyer Excel Discussion (Misc queries) 1 March 4th 05 06:37 PM


All times are GMT +1. The time now is 12:31 PM.

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

About Us

"It's about Microsoft Excel"