CasewareDocs

CheckAccessRights

Checks the access rights for a specific directory.

If a user does not have full rights, an error will be raised. If this is the case the macro should be terminated.

Compatibility

Available as of IDEA version 9.0

Syntax

CheckAccessRights(path as String)

Parameter

path

Path on which the check will be performed.

Remarks

An error is raised if the path does not exist.

Example

Sub Main

Set SimpleCommands = SmartContext.MacroCommands.SimpleCommands

'Check access rights without error handling
SimpleCommands.CheckAccessRights Client.WorkingDirectory
On Error GoTo ErrHandler
...

'Release object
Set SimpleCommands = Nothing

ExitSub
ErrHandler:

...

End Sub'Main
CheckAccessRights | Caseware Docs