Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How separate text boxes from pictures in the same worksheet by code?
Hi everyone,
I have PICTURES (created by "CopyPicture method" by the way) embedded in a excel worksheet and I want to allow to copy them. I ALSO in the same sheet have TEXT BOXES and I want to protect their text. I tried with drawingobjects.select, but found out that a picture is a drawing object. Is there a specified objecttype just for text boxes I can use to protect just them? [Sheet1.TextBoxes.Protect = True would be nice..but doesn't exist.] I DON'T want to change from text boxes to merged cells , I have just left that track of several reasons. I want my boxes protected (and protected cells in the sheet) and allow copy the pictures /BEST REGARDS and thanks in advance |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How separate text boxes from pictures in the same worksheet by code?
Here is the solution
Sub LockTextBoxNotPic() Dim myShape As Shape For Each myShape In ActiveSheet.Shapes If myShape.Type = msoTextBox Then myShape.Locked = True Else If myShape.Type = msoPicture Then myShape.Locked = False End If End If Next myShape End Sub /Regards "Marie J-son" skrev i meddelandet ... Hi everyone, I have PICTURES (created by "CopyPicture method" by the way) embedded in a excel worksheet and I want to allow to copy them. I ALSO in the same sheet have TEXT BOXES and I want to protect their text. I tried with drawingobjects.select, but found out that a picture is a drawing object. Is there a specified objecttype just for text boxes I can use to protect just them? [Sheet1.TextBoxes.Protect = True would be nice..but doesn't exist.] I DON'T want to change from text boxes to merged cells , I have just left that track of several reasons. I want my boxes protected (and protected cells in the sheet) and allow copy the pictures /BEST REGARDS and thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pictures and Text Boxes print in wrong position and size in 2007 | Excel Discussion (Misc queries) | |||
pictures in comment boxes? | Excel Discussion (Misc queries) | |||
Looking for code to separate one line of text into multiple lines in Excel | Excel Worksheet Functions | |||
Code-Copy & Paste in Text Boxes | Excel Programming | |||
Select text boxes code | Excel Programming |