Insert Photo into a protected worksheet

G

Guest

How can I allow a user to insert a photo into a particular cell of a
protected worksheet?
 
P

Paul B

gnolla, how about with a macro?
The first one you can hard code the pic you want, the second one will bring
up the insert picture dialog box and let them pick the one they want

Sub test()
Const PW As String = "123" 'Change Password Here
ActiveSheet.Unprotect Password:=PW
Range("C4").Select
ActiveSheet.Pictures.Insert( _
"C:\My Documents\My Pictures\TestPic").Select
'change pic location and name above
ActiveSheet.Protect Password:=PW
End Sub

Sub test1()
Const PW As String = "123" 'Change Password Here
ActiveSheet.Unprotect Password:=PW
Range("C4").Select
Application.Dialogs(xlDialogInsertPicture).Show
ActiveSheet.Protect Password:=PW
End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top