Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel 2003 insert picture in locked worksheet

Status
Not open for further replies.
Oct 16, 2008
17
US
I've had the request to figure out how to insert a picture into a locked worksheet in Excel 2003. Currently it is not possible to copy/paste into a locked sheet, nor go to Insert picture from file. The options are grayed out. Do I need to use a macro to do this? If so could someone please help me with this?

Here is what I've come up with so far (password is stored on a separate sheet called Parameter). Am I on the right track?

Sub Macro1()
ActiveSheet.Unprotect Password:=Sheets("Parameter").Range("A1")
dlgAnswer = Application.Dialogs(xlDialogBrowse).Show

End Sub

Sub Macro2()
ActiveSheet.Protect Password:=Sheets("Parameter").Range("A1")
End Sub
 


Hi,

VBA (macro) questions are best addressed in forum707.

Yes, you must first unprotect a sheet to perform this kind of method and then protect.

I would suggest using the xlVeryHidden constant for the Worksheet Visible property, as that can ONLY be changed via code or from the VBA Editor. I would also password protect your VBA Project if you want a more secure application.

Keep in mind, however, that MS applications cannot be made very secure and passwords can be broken by knowledgeable hackers.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Thank you for your suggestions, Skip. I decided to not use macros in this situation after all, but I'll refer to that forum in the future.

The workaround I came up with is that the user can insert the picture onto another tab in the workbook. They can then paste the picture onto the protected sheet. A strange glitch in Excel 2003, but it works.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top