+ Reply to Thread
Results 1 to 1 of 1

Opening and Saving Enbedded Object Off

Hybrid View

  1. #1
    Registered User
    Join Date
    01-31-2018
    Location
    Denver, Colorado
    MS-Off Ver
    2013
    Posts
    1

    Opening and Saving Enbedded Object Off

    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
    Last edited by Leith Ross; 01-31-2018 at 08:56 PM. Reason: Added Code Tags

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Saving & Opening Problem
    By Geordie in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-24-2015, 12:35 PM
  2. Saving Workbook Upon Opening
    By ragrone in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-07-2014, 01:48 AM
  3. Slow saving and opening
    By cooper72 in forum Excel General
    Replies: 5
    Last Post: 05-08-2014, 11:37 AM
  4. Saving and Opening
    By Dinger045 in forum Excel General
    Replies: 0
    Last Post: 12-05-2012, 10:35 AM
  5. Opening/saving a file
    By jamjam in forum Excel General
    Replies: 3
    Last Post: 11-30-2007, 08:33 AM
  6. Saving / opening options
    By mayala33 in forum Excel General
    Replies: 1
    Last Post: 08-25-2006, 12:55 PM
  7. Opening/saving a web page via VBA
    By Ron in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-18-2006, 01:40 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1