Results 1 to 3 of 3
  1. #1
    JackieEVSC is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Oct 2011
    Posts
    70

    How do I open an existing Excel spreadsheet through Access that is NOT read-only?


    I created an Excel file that users will copy to the root of C:. The reasoning behind having them use one on their local drive is so they can work on their own spreadsheet. I want the users to be able to click a button to open this file, then scan device asset tags to the spreadsheet, save it and exit. Another button will delete the existing tbl_AssetTags, import the spreadsheet file as the a new tbl_AssetTabs (a local, not linked table), and produce a report with asset and serial number tags. The code I am using to access the spreadsheet opens it as read-only. The code I'm using is: Dim stAppName As String stAppName = "excel.exe \\netappb\Administration\InfoSys\Netbooks\CreateTa gsByAssetNums.xlsx" Shell stAppName, vbNormalFocus How do I open an existing Excel spreadsheet through Access that is NOT read-only?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    I tested the Shell code and file opens in editable mode.

    What are the permission settings for the file and/or folders?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Micron is online now Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,776
    In addition to June's idea, the read only property can be set on the file's property sheet, which is not dependent on the file or folder permissions. Right click on the file in Windows Explorer and see if the read only property checkbox is checked. I see that you are not using an Excel extension that is read only by default (such as xlt), so that should not be the issue. Test the permissions by trying to open the file directly. If the user can, permissions are not the issue if they are using your database under their own login credentials.

    The other thought I had is that I'm used to seeing the call surrounded by () and in some cases, extra quotes. Don't know why, but I suggest trying that if the other suggestions don't help. E.g. Shell """C:\....\MSACCESS.exe C:\Yourdb.mdb /Excl /x mcrStartup""" or Shell ("C:\....\MSACCESS.exe C:\Yourdb.mdb /Excl /x mcrStartup")

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 02-13-2015, 12:34 AM
  2. Replies: 1
    Last Post: 02-02-2015, 04:08 PM
  3. Importing Excel spreadsheet and appending it to an existing table
    By Access_Novice in forum Database Design
    Replies: 3
    Last Post: 08-21-2014, 07:01 AM
  4. Replies: 3
    Last Post: 11-12-2013, 04:13 PM
  5. Open Excel spreadsheet in Access
    By carlyd in forum Forms
    Replies: 1
    Last Post: 02-17-2012, 01:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums