View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] pricek@chesterfield.gov is offline
external usenet poster
 
Posts: 1
Default Inserting a picture macro

I have created a macro that will allow the user to insert a picture and
resize it.

Sub Insert_pic()
'
' Insert_pic Macro
' Macro recorded 6/23/2006 by pricek
'

Const PW As String = "fire" 'Change Password Here
ActiveSheet.Unprotect Password:=PW
Range("a5:z5").Select

Application.Dialogs(xlDialogInsertPicture).Show
'ActiveSheet.Shapes.Select
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Height = 250#
Selection.ShapeRange.Width = 475#
ActiveSheet.Protect Password:=PW
End Sub

Once the picture is inserted, I need to save it to a specified folder
and I also want it to have a specified name. They should only be able
to add one picture, so if additional pictures are added it should
overwrite the first picture. I have setup additional buttons to allow
the user to rotate it, which is based on the specified name.