Results 1 to 4 of 4

Thread: Force Excel App to OPEN, disallow SAVE

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2003
    Location
    USA, East Coast
    Posts
    257

    Force Excel App to OPEN, disallow SAVE

    Hello,

    When the browser asks:
    "Would you like to OPEN the file or SAVE it to your computer?"

    Is there a way to force an OPEN choice? We never want the User to be able to do an explicit SAVE. of our app.

    The application is an Excel Workbook executed online on a web server.

    Thanks,
    CyberJar

  2. #2
    Member
    Join Date
    May 2004
    Location
    Dubai, United Arab Emirates
    Posts
    33
    If i assume that you don't want users to enter any data and Save, Why don't you protect the sheet ? Tools | Protection


    Alternatively, will this code work for you ?

    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, cancel As Boolean)
    cancel = True
    End Sub



    Paste the below code into ThisWorkbook.

    How to do that ?

    Open your workbook.
    Press Alt + F11
    See if you can find "ThisWorkbook
    Double click on it and on the blank White page, paste the above code.

    Best Regards,

    S h a n

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    May 2003
    Location
    USA, East Coast
    Posts
    257
    Hello,

    I should explain further. This happens before the User has even opened my Application.

    The Open/Save message is actually a File Download feature of the browser.
    My Application itself does not allow Users to save on exit using the techniques you indicated above, but just selecting the app in the URL kicks off the Open/Save dialog box. (http://www.mysite.com/Book1.xls)

    Is there a way to prevent this dialog box from prompting the User to Save - We want them to OPEN.

    Thanks,
    CyberJar

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    Isn't there an option in web settings or such like there is in Word
    to open in browser or not? I can't find it if there is. Not in Office 2003.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

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



Click Here to Expand Forum to Full Width