+ Reply to Thread
Results 1 to 3 of 3

Beforeclose problem when file is opened as Read only

  1. #1
    Registered User
    Join Date
    02-02-2010
    Location
    Belgium
    MS-Off Ver
    Excel 2003
    Posts
    47

    Beforeclose problem when file is opened as Read only

    Hello,

    When my workbook is opened as read only with macro's enabled the VBA gives an error when I wan't to close the workbook?

    As you can see the beforeclose saves a copy to a specific location and a backup.

    can this be solved by making it skip the code when the workbook is opened in read only mode??

    Please Login or Register  to view this content.
    Last edited by Bluewhistler; 07-12-2010 at 04:16 AM.

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Beforeclose problem when file is opened as Read only

    SaveCopyAs should be fine, I would think, but the ThisWorkbook.Save will fail. Try:
    Please Login or Register  to view this content.
    Remember what the dormouse said
    Feed your head

  3. #3
    Registered User
    Join Date
    02-02-2010
    Location
    Belgium
    MS-Off Ver
    Excel 2003
    Posts
    47

    Re: Beforeclose problem when file is opened as Read only

    Quote Originally Posted by romperstomper View Post
    SaveCopyAs should be fine, I would think, but the ThisWorkbook.Save will fail. Try:
    Please Login or Register  to view this content.
    BullsEye!
    many thx

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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