Sub ki018() fff = Application.GetOpenFilename(Title:="ファイル名指定") dat = GetAttr(fff) If dat = 1 Then MsgBox fff & "は読取専用ファイルです" Else MsgBox fff & "は読取専用ファイルでは有りません" End If End Sub Sub ki018a() SetAttr "c:\My Documents\Book3.xls", vbReadOnly End Sub Sub ki018b() SetAttr "c:\My Documents\Book3.xls", vbNormal End Sub