| 
    
     |  | 任意のファイル名のPRNファイルを開き、"*"という文字列があった場合、 "*  0 0 1"という文字列に置換後、上書き保存をするという
 マクロを作成したいのですが、以下のファイル名の検索過程で上手く動作しません
 でした。PRNファイルですと実行できないのでしょうか?
 
 
 Sub Macro2()
 Dim f As String
 Dim myFSO As Object
 Dim oFold As String
 Dim oFile As String
 Dim c As Range
 Set myFSO = CreateObject("Scripting.FileSystemObject")
 
 
 oFold = Sheet1.Range("AL2").Value
 oFile = oFold Like "*.prn"
 'リンク先フォルダが存在するものだけ
 If myFSO.folderExists(oFold) Then
 If myFSO.fileExists(oFold & oFile) Then
 Open oFold & oFile For Input As #1
 End If
 End If
 
 
 End Sub
 
 |  |