ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   insert picture (https://www.excelbanter.com/excel-programming/298114-insert-picture.html)

chad

insert picture
 
I'm trying to use excel 2000 vba to insert a picture based on a user's input of an employee id number. I'm tyring
picname = "c:\employee\pictures\" & empnumber & ".jpg

When i include this in the code it does not work. Any suggestions?

Simon Lloyd[_453_]

insert picture
 
Hi,

i have just recoreded this macro

Sub Picinsert()
'
' Picinsert Macro
' Macro recorded 13/05/2004 by Simon
'
' Keyboard Shortcut: Ctrl+Shift+I
'
Range("C14:G24").Select
Selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture
Sheets("Sheet1").Select
Range("D14").Select
ActiveSheet.PasteSpecial Format:="Picture (Enhanced Metafile)"
Link:=False _
, DisplayAsIcon:=False
End Sub

where Range is your selection to be a picture and sheets ("sheet1") i
the destination and Range("D14") is the destination cell to star
pasting from, as you didnt supply any code of your own its difficult t
see what you are trying to do...any way its all well beyond me i'e onl
just started at this stuff!

HTH

Simo

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 04:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com