View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default JPG Insert using VBA

When you do an Insert|picture, you get that open dialog that has an option to
show details, list, small icons, large icons and preview.

When you do preview, you can see the picture, but it's one at a time. If that's
ok, you can use something like this:

Option Explicit
Sub testme()

Dim myFileName As Variant

myFileName = Application.GetOpenFilename
If myFileName = False Then
'user hit cancel
Exit Sub '??
End If

'Then Bob's code
ActiveSheet.Pictures.Insert filename:=myfilename

End Sub

(If you use windows XP, can't you see the pictures as bitmaps in the open
dialog? (I don't use winXP.))

But I do use a very nice program called Irfanview. It's at:
http://www.irfanview.com



JBob wrote:

Is there a way to use a pull down or a list box for a
certain folder / directory and have thumbnail views of the
image files available within an excel2002 worksheet?

Regards,
JB
-----Original Message-----
Hayman,

Taken from the macro recorder

ActiveSheet.Pictures.Insert ( _
"C:\My Pictures\Winter.jpg")


--

HTH

Bob Phillips

"Hayman" wrote in message
...
Is there a way to insert a jpg picture into an excel

sheet using VBA or
visual basic languages?
Your help is really appreciated.
Hayman




.


--

Dave Peterson