Display 'read only' dialog (vba)

K

kimkom

Hi all,

Can someone please tell me how to display a dialog if a pps is currently in
'read only' mode?

For instance:
Pressing an Enter button on the opening slide of a presentation runs a macro
which checks if it's currently in 'read only' mode and if so displays a
MsgBox or certain slide.

Many thanks,
Michael
 
M

Michael Koerner

Which version of PowerPoint are you using? You can password protect some
versions of PowerPoint. Normally the enter key is used to transaction form
one slide to the next

--
Michael Koerner
MS MVP - PowerPoint


Hi all,

Can someone please tell me how to display a dialog if a pps is currently in
'read only' mode?

For instance:
Pressing an Enter button on the opening slide of a presentation runs a macro
which checks if it's currently in 'read only' mode and if so displays a
MsgBox or certain slide.

Many thanks,
Michael
 
A

Austin Myers

With Application.ActivePresentation
If .ReadOnly Then
Msgbox "This file is opened in read only mode."
End With


Austin Myers


Creators of PFCMedia and PFCPro
 
K

kimkom

Thanks.

Michael, I'm using 2007 but the end user is on 2003.

Austin, thanks for that I'll give it a try.

Steve, I'll try! ;-)

Michael
 
K

kimkom

Austin,

I have tried applying the code to a button with no effect after changing the
read only state i.e.:

Sub ReadOnlyTest()
With Application.ActivePresentation
If .ReadOnly Then
Msgbox "This file is opened in read only mode."
End With
End Sub

I've also tried:

Sub ReadOnlyTest()
If ActivePresentation.ReadOnly = msoTrue Then
MsgBox "Read Only"
End If
End Sub


Any suggestions please?


Background info:

It is my intention to use this to check to determine whether another user on
a shared network currently has the same presentation open i.e. UserA clicks a
hyperlink to open the file, UserB then opens the same file but in read only
format. Pressing an 'Enter' button on the opening slide then runs the
ReadOnlyTest() Sub.

Is this possible? Am I going about this the correct way?

Thanks,
Michael
 
K

kimkom

Apologies Austin,

I should check my own code more carefully! There was an error in another
part of my code, your code works fine.

Thank you
Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top