我想使用textbox1值在文件夹中搜索pdf文件并打开pdf文件。
iso = Me.TempCombo.Value
If Me.TempCombo.Value = "" Then
Exit Sub
End If
finalrow = Sheets("Hyperlink").Range("A6000").End(xlUp).Row
For i = 2 To finalrow
If Sheets("Hyperlink").Cells(i, 1) = iso Then
Me.TextBox26 = Cells(i, 1).Value & Worksheets("Hyperlink").Cells(i, 1).Value
End If
Next i
ActiveWorkbook.FollowHyperlink Address:="\\OPDD-2UA8302DBK\Users\rossa1\Desktop\Portal to Andrew Side\TORQUE MAPS\" ' & Me.TextBox26.Value"
End Sub
答案 0 :(得分:0)
您可以使用以下方式打开pdf文件:
Sub test()
Filename = TextBox1.Text
ActiveWorkbook.FollowHyperlink Filename
End Sub