Consulting

Results 1 to 3 of 3

Thread: After user clicks 'Notify', do this

  1. #1

    After user clicks 'Notify', do this

    Hi,

    I have an excel (365) file in a share folder. The file has the 'Read only recommended' when opening. Is there a way to detect when a user clicks on the 'Notify' option and the macro will action a segment of codes? eg
    Private Sub Workbook_Open()
    If userclicks.notify then 
    do this
    Else 'when user clicks Read only
    end if
    End Sub
    Thanks
    Last edited by Aussiebear; 11-27-2022 at 07:07 PM. Reason: Added code tags to supplied code

  2. #2
    Moderator VBAX Master georgiboy's Avatar
    Joined
    Mar 2008
    Location
    Kent, England
    Posts
    1,194
    Location
    Not sure about the 'Notify' button but you can ask if the file is read only within a 'Workbook Open' sub:

    Private Sub Workbook_Open()    
    If ThisWorkbook.ReadOnly = True Then
         MsgBox "File is read only"
    End If
    End Sub
    Click here for a guide on how to add code tags
    Click here for a guide on how to mark a thread as solved
    Click here for a guide on how to upload a file with your post (you may need to click 'Go Advanced')

    Excel 365, Version 2403, Build 17425.20146

  3. #3
    Thanks Georgiboy but the ReadOnly is not what I'm after.

Posting Permissions

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