Hello to all,
I have developed a survey sheet using 2007 and saved a copy for use with 2003. When end users try to utilize the protected sheet in 2003 they get a runtime error whenever they click the button linked to this macro. This also occured with 2010 version. I was able to load the version created with the 2007 onto a machine I have with 2010 on it and eliminated the error by unprotecting the sheet, re-protecting it making sure the Edit Objects box was checked. I tried this with 2003 on a machine running 2003 but I still receive the same error. I went as far as to check every box in the protection screen to no avail.
The error goes away if you unprotect the sheet. Both the 2007 and 2010 versions work perfectly now. Can anybody help to determine if I'm simply unable to run this macro within a protected 2003 version?
The code is to insert a picture
Sub InsertPicture() Dim sPicture As String, pic As Picture sPicture = Application.GetOpenFilename _ ("Pictures (*.gif; *.jpg; *.bmp; *.tif; *.png), *.gif; *.jpg; *.bmp; *.tif; *.png", _ , "Select Picture to Import") If sPicture = "False" Then Exit Sub Set pic = ActiveSheet.Pictures.Insert(sPicture) With pic .ShapeRange.LockAspectRatio = msoFalse .Height = Range("E13:E32").Height .Width = Range("E32:K32").Width .Top = Range("E13").Top .Left = Range("E13").Left .Placement = xlMoveAndSize End With Set pic = Nothing End Sub
Thanks in advance