View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Don Lloyd Don Lloyd is offline
external usenet poster
 
Posts: 119
Default Arguments for a filename

Hi again,

I'm not sure of your procedure for getting the picture. Where is this
Private Sub ?

If the name of the picture is on the activesheet, say in cell "A6", all you
need is the following in a standard module.

Sub GetPicture()
Dim Fname As String
Fname = Range("A6") & ".bmp"
ActiveSheet.Pictures.Insert ("C:\My Blah\My Pictures\NameWithBMP")
End Sub

If the path is correct and the picture is in the file, it will load.
I suggest you get the basic part as above working to start with and then
post back.

Regards,
Don

"Michael Smith" wrote in message
...
I see what you are saying but its still not working for me...here's what
I got so far....thanks again.

Sub GetPic()
Call PicImport("A6", "FRED")
End Sub
Private Sub PicImport(Cell, Name)
If Range(Cell).Text = Name Then
Dim NameWithBMP
NameWithBMP = Name & ".bmp"
ActiveSheet.Pictures.Insert("C:\My Blah\My
Pictures\NameWithBMP").Select
Else: End If

End Sub


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!