ネットワークエラーを無視する方法があればご教示いただきたいと思います。
よろしくお願いします。
以下のコードでは対応していないようなのであればお願いします。
Sub Auto_Open() Dim x, a, b, c, d As Long Dim sh1 As Worksheet Dim pdfpath As String On Error Resume Next Set sh1 = Worksheets("Sheet1") For b = 1 To Range("J60000").End(xlUp).Row x = Mid(sh1.Cells(b, 10), 1, 8) c = Mid(sh1.Cells(b, 10), 3, 6) a = Mid(sh1.Cells(b, 10), 3, 4) If Range("A18") = Cells(b, 1) Then With CreateObject("Shell.Application") .ShellExecute "\機械図面\製造図面" & "\" & "NS" & a & "00" & "~" & "NS" & a & "99" & "\" & x & ".pdf" End With End If Next b On Error GoTo 0 End Sub
回答2件
あなたの回答
tips
プレビュー