Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display Image in Excel 1

Status
Not open for further replies.

beautieee

Programmer
Oct 4, 2008
46
MY
Dear All,

Need a little help for displaying image in Excel. Basically image succefully added into excel but not displaying. will need to double-click to open the image.

Below is the code written for the purpose, could anyone give me some hints?

Can it be done for displaying image from using vb code ?

Code:
objSheet.OLEObjects.Add(, "C:\logo.bmp", False, True, "mspaint.exe", 0, "C:\logo.bmp").Select

Thank you in advance.

Regards,
Beautieee
 
This is from recording a macro to copy it and move it:

ActiveSheet.Pictures.Insert("C:\Pictures\untitled.bmp").Select
Selection.ShapeRange.IncrementLeft -40.5
Selection.ShapeRange.IncrementTop 76.5
 
Tyson,
Thank you very much! It worked as expected. But How do I fix the position for the image? Realised the code was Incrementleft, how to fix to designated left column ?

Regards,
Beautieee
 
Thank you Simon for your reply. Having this initiative to solve end-user's requirement to ease their work.

Regards,
Beautieee.
 
I use this:

Code:
Set xl = New Excel.Application
    With xl
    .Range("A2").Select
    .ActiveSheet.Pictures.Insert ("C:\MyPicture.bmp")
End With
 
Tyson,

Very much appreciated with your valuable reply.

Thank you very much. :)

Regards,
Beautieee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top