Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like to insert a picture from file into a protected worksheet. At
this point, the Excel pull down menus are greyed out for this feature as long as the sheet is protected. As far as the user is concered, I want to keep the sheet protected. I am looking for a simple solution to allow the insertion of a picture. If this does not work, I will most likely resort to creating a macro with a button for picture insertion. Thanks for the help in advance. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can unprotect it and then protect it again within your code.
ActiveSheet.Protect Password:="fish" 'your code to insert picture, will be something like this but you may also want to resize or reposition it ActiveSheet.Pictures.Insert("C:\mypic.jpg") ActiveSheet.Unprotect Password:="fish" if screen flickering is a problem, use application.screenupdating = false before your code AND application.screenupdating = true after it HTH -- Allllen "ZipCurs" wrote: I would like to insert a picture from file into a protected worksheet. At this point, the Excel pull down menus are greyed out for this feature as long as the sheet is protected. As far as the user is concered, I want to keep the sheet protected. I am looking for a simple solution to allow the insertion of a picture. If this does not work, I will most likely resort to creating a macro with a button for picture insertion. Thanks for the help in advance. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the quick response. I understand the approach that you are
recommending, but was hoping for a simpler approach. My real question is: Is it impossible to insert a picture into a protected worksheet? If not, how do you do it? "Allllen" wrote: You can unprotect it and then protect it again within your code. ActiveSheet.Protect Password:="fish" 'your code to insert picture, will be something like this but you may also want to resize or reposition it ActiveSheet.Pictures.Insert("C:\mypic.jpg") ActiveSheet.Unprotect Password:="fish" if screen flickering is a problem, use application.screenupdating = false before your code AND application.screenupdating = true after it HTH -- Allllen "ZipCurs" wrote: I would like to insert a picture from file into a protected worksheet. At this point, the Excel pull down menus are greyed out for this feature as long as the sheet is protected. As far as the user is concered, I want to keep the sheet protected. I am looking for a simple solution to allow the insertion of a picture. If this does not work, I will most likely resort to creating a macro with a button for picture insertion. Thanks for the help in advance. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
yes, but . . .
Work around 1. when you protect the sheet, only protect contents. Insert the picture to another unprotected sheet, then copy and paste it to your protected sheet. work around 2 s = "C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Blue Hills.jpg" ActiveSheet.Protect Password:="ABC", UserInterfaceOnly:=True ActiveSheet.Pictures.Insert (s) You only need to set the UserInterfaceOnly property once as long as the worksheet stays protected. It can only be set with code and it has to be done whenever the workbook is opened Work around 3 You received that help -- Regards, Tom Ogilvy "ZipCurs" wrote in message ... Thanks for the quick response. I understand the approach that you are recommending, but was hoping for a simpler approach. My real question is: Is it impossible to insert a picture into a protected worksheet? If not, how do you do it? "Allllen" wrote: You can unprotect it and then protect it again within your code. ActiveSheet.Protect Password:="fish" 'your code to insert picture, will be something like this but you may also want to resize or reposition it ActiveSheet.Pictures.Insert("C:\mypic.jpg") ActiveSheet.Unprotect Password:="fish" if screen flickering is a problem, use application.screenupdating = false before your code AND application.screenupdating = true after it HTH -- Allllen "ZipCurs" wrote: I would like to insert a picture from file into a protected worksheet. At this point, the Excel pull down menus are greyed out for this feature as long as the sheet is protected. As far as the user is concered, I want to keep the sheet protected. I am looking for a simple solution to allow the insertion of a picture. If this does not work, I will most likely resort to creating a macro with a button for picture insertion. Thanks for the help in advance. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, I think a combination of the three may work for me.
"Tom Ogilvy" wrote: yes, but . . . Work around 1. when you protect the sheet, only protect contents. Insert the picture to another unprotected sheet, then copy and paste it to your protected sheet. work around 2 s = "C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Blue Hills.jpg" ActiveSheet.Protect Password:="ABC", UserInterfaceOnly:=True ActiveSheet.Pictures.Insert (s) You only need to set the UserInterfaceOnly property once as long as the worksheet stays protected. It can only be set with code and it has to be done whenever the workbook is opened Work around 3 You received that help -- Regards, Tom Ogilvy "ZipCurs" wrote in message ... Thanks for the quick response. I understand the approach that you are recommending, but was hoping for a simpler approach. My real question is: Is it impossible to insert a picture into a protected worksheet? If not, how do you do it? "Allllen" wrote: You can unprotect it and then protect it again within your code. ActiveSheet.Protect Password:="fish" 'your code to insert picture, will be something like this but you may also want to resize or reposition it ActiveSheet.Pictures.Insert("C:\mypic.jpg") ActiveSheet.Unprotect Password:="fish" if screen flickering is a problem, use application.screenupdating = false before your code AND application.screenupdating = true after it HTH -- Allllen "ZipCurs" wrote: I would like to insert a picture from file into a protected worksheet. At this point, the Excel pull down menus are greyed out for this feature as long as the sheet is protected. As far as the user is concered, I want to keep the sheet protected. I am looking for a simple solution to allow the insertion of a picture. If this does not work, I will most likely resort to creating a macro with a button for picture insertion. Thanks for the help in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Allowing insert picture on a protected sheet | Excel Discussion (Misc queries) | |||
How do I allow insert picture in sheet when it is protected | Excel Discussion (Misc queries) | |||
insert picture into protected sheet | Excel Discussion (Misc queries) | |||
How can you insert a picture in a protected Excel Sheet? | Excel Worksheet Functions | |||
How can I insert a picture from file while worksheet is protected | Excel Discussion (Misc queries) |