【发布时间】:2015-08-08 05:49:35
【问题描述】:
我想检查文件是否受密码保护。下面的代码工作正常。但是我的工作簿是受密码保护的,请告知在下面的代码中将密码放在哪里
Sub Example1()
If GetAttr("c:\test.xls") And vbReadOnly Then
MsgBox "File is Read-only"
Else
MsgBox "File is not read-only"
End If
End Sub
【问题讨论】: