How to load picture by VBA ?

sthanawa

Board Regular
Joined
Jul 5, 2006
Messages
80
Hi all ,

I have one more question about the Image Control in Excel. Why is it unable to use ? when I wrote the code in Modules , not it the private sheet.

My code as following.

Sub LoadPic()
Image1.Picture = LoadPicture("D:\kong2.jpg")
End Sub

How can I change this code and can use in the Modules? please suggest.
 

Some videos you may like

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

NdNoviceHlp

Well-known Member
Joined
Nov 9, 2002
Messages
2,490
Sheets("sheet1").Image1.Picture = LoadPicture("D:\kong2.jpg") HTH. Dave
 

Watch MrExcel Video

Forum statistics

Threads
1,108,507
Messages
5,523,310
Members
409,511
Latest member
hitesh222002

This Week's Hot Topics

Top