Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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
 

Jonathan_T

Member level 1
Joined
Mar 28, 2007
Messages
33
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
1,447
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
https://www.embedded-hardware.com
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top