Macro in Excel VB (Inserting Picture)

Status
Not open for further replies.

theone_in_themoon

Junior Member level 3
Joined
Oct 20, 2003
Messages
28
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Lahore Pakistan
Activity points
323
Im trying to insert a picture through Macro in a worksheet.

The following line of Code doesnt work.

Code
---------------------------------------------
ActiveSheet.Pictures.Insert("C:\HomeData\PICTURES\EMPLOYEE\" & employee_number & ".JPG").Select
---------------------------------------------

Where 'employee_number' is a string.

Please help ...

Thanks in advance
 

you may be add string val. for get path picture thus as code below

------------------ Ex. code ------------------------------------------------------------
Dim MyPath as String

MyPath=("C:\HomeData\PICTURES\EMPLOYEE\" & employee_number & ".JPG"
ActiveSheet.Pictures.Insert(MyPath).Select
-------------------------------------------------------------------------------------------

--------------------------------------
My Favorite Microcontroller
**broken link removed**
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…