Good afternoon, all!
I'm relatively new to macro development, so forgive me if this is a simple problem to solve.
I have a number of objects embedded in my spreadsheet - PowerPoint, pdf and Word files. When the user opens them, I want to be sure that they cannot save anything they enter back into the workbook. It would also be nice if the opened file were displayed and ready for editing. What's the best way to go about doing that?
I've built a macro that opens the file, but when the user uses "Save As...", saves the file to the desktop and makes edits, the edits are saved back into the workbook as well.
Here is a sample of the macro that opens and displays the file:
Sub Open_PIK_Template()
'
' Open_PIK_Template Macro
'
'
Dim sourceSheet As Worksheet
Set sourceSheet = ActiveSheet
ActiveSheet.Range("A1").Select
Application.ScreenUpdating = False
ActiveWorkbook.Unprotect
Worksheets("Do Not Edit").Visible = True
Sheets("Do Not Edit").Select
ActiveSheet.Shapes.Range(Array("Object 28")).Select
Selection.Verb Verb:=xlOpen
Worksheets("Do Not Edit").Visible = False
ActiveWorkbook.Protect
Application.ScreenUpdating = True
Call sourceSheet.Activate
End Sub
Thanks -
bpkcjgorr
Bookmarks