Picture Help Please on Protected Sheet

kathleen

Active Member
Joined
Dec 16, 2002
Messages
295
I have a sheet that is protected through code. I don't want users to add anything other than a picture. When I select:

Insert
Picture

All options other the organization chart are dimmed out

Any clues on how I can let them add an image ?
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
You would have to write a macro (maybe attached to a Button) that would unprotect the sheet, enable the user to insert a picture and reprotect the sheet.
 
Upvote 0
I do have a command button and the following attached to it


Sub Setup_Asset()

ActiveSheet.Unprotect Password:="assets"

Application.DisplayAlerts = False

GetAssetID
If Len(TheAssetID) <> 8 Then ErrorAsset

Application.ScreenUpdating = False

Sheets("Results").Select
Range("A1").Select

With Selection.QueryTable
.Connection = _
"ODBC;DRIVER=SQL Server;SERVER=T00SQL04;UID=#####;PWD=##;APP=Microsoft Office 2003;WSID=########"
.CommandText = Array( _
"SELECT Assets.ASSET_ID, Assets.CATEGORY, Assets.DEPT, Assets.DESCR, Assets.INSERVICE, Assets.PLANT, Assets.SERIALID, Assets.TAGNUMBER" & Chr(13) & "" & Chr(10) & "FROM AssetCatalog.dbo.Assets Assets" & Chr(13) & "" & Chr(10) & _
"WHERE (Assets.ASSET_ID='" & TheAssetID & "')" & Chr(13) & "" & Chr(10) & "ORDER BY Assets.ASSET_ID")
.Refresh BackgroundQuery:=False
End With

Notes = InputBox("Any Special Notes")

Range("B2").Select
TheCategory = ActiveCell.Value

Range("C2").Select
TheDept = ActiveCell.Value

Range("D2").Select
TheDesc = ActiveCell.Value

Range("E2").Select
TheInservice = ActiveCell.Value

Range("F2").Select
ThePlant = ActiveCell.Value

Range("G2").Select
TheSerial = ActiveCell.Value

Range("H2").Select
TheTagNumber = ActiveCell.Value

Sheets("Setup").Select

Range("C8").Select
ActiveCell.Value = TheAssetID

Range("C9").Select
ActiveCell.Value = TheTagNumber

Range("C11").Select
ActiveCell.Value = Notes

Range("B14").Select
ActiveCell.Value = TheDesc

Range("F8").Select
ActiveCell.Value = TheSerial

Range("F9").Select
ActiveCell.Value = TheCategory

Range("F10").Select
ActiveCell.Value = TheDept

Range("K8").Select
ActiveCell.Value = TheInservice

Range("K9").Select
ActiveCell.Value = ThePlant

Range("B16").Select
MsgBox ("Insert picture in Cell B16. You can use your drawing tools eg: arrows, text boxes etc. to add any additional information")


ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
True, AllowInsertingColumns:=True, Password:="assets"




End Sub
 
Upvote 0
Your code doesn't wait for the user to insert a picture. It only waits until the user dismisses the message box.

Try:

Code:
Application.Dialogs(xlDialogInsertPicture).Show

I don't know about the drawing tools though.
 
Upvote 0

Forum statistics

Threads
1,203,124
Messages
6,053,643
Members
444,675
Latest member
FedElecQaEng

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top