Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Scott Peebles
 
Posts: n/a
Default How do I insert an image into a specific cell within a protected .

How do I insert an image into a specific cell within a protected worksheet.
I have created an order form that is protected so users can only enter data
into specific cells. However, I would like users to be able to insert a
graphic file/image into a specific set of merged cells. Please help.

Thanks,
Scott

  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

I think I'd give them a macro to do it.

The macro would ask for the filename, unprotect the sheet, add the graphic to
the correct location, and reprotect the sheet.

Option Explicit
Sub testme02()

Dim myPictureName As Variant
Dim myPict As Picture
Dim myRng As Range

myPictureName = Application.GetOpenFilename _
(filefilter:="Picture Files,*.jpg;*.bmp;*.tif;*.gif")

If myPictureName = False Then
Exit Sub 'user hit cancel
End If

With Worksheets("sheet1")
.Unprotect Password:="hi"
Set myRng = .Range("A1:e10")
Set myPict = .Pictures.Insert(myPictureName)
myPict.Top = myRng.Top
myPict.Width = myRng.Width
myPict.Height = myRng.Height
myPict.Left = myRng.Left
myPict.Placement = xlMoveAndSize
.Protect Password:="hi"
End With
End Sub

Scott Peebles wrote:

How do I insert an image into a specific cell within a protected worksheet.
I have created an order form that is protected so users can only enter data
into specific cells. However, I would like users to be able to insert a
graphic file/image into a specific set of merged cells. Please help.

Thanks,
Scott


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Challenging Charting C TO Charts and Charting in Excel 0 January 17th 05 07:57 PM
automatically insert system time in a cell PM Excel Discussion (Misc queries) 2 December 30th 04 05:56 PM
Excel document properties insert into a cell Mark Excel Discussion (Misc queries) 3 December 16th 04 03:05 PM
Can I insert digital signatures into an Excel cell? DrewAtNucorUtah Excel Discussion (Misc queries) 1 December 15th 04 07:00 PM
How can I activate cell shading in a protected worksheet? unprotect cell shading Excel Discussion (Misc queries) 1 December 8th 04 08:31 AM


All times are GMT +1. The time now is 06:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"