我有以下代码,但是在选择文件类型(应仅限于 PDF)时,下拉框不止一个条目,因此看起来像这样:
.
我怎样才能改变外观,使它只有一个条目的大小?我敢肯定我以前在其他地方见过它。
Private Sub Command2_Click()
Dim f As Object
Dim g
Dim vrtSelectedItem As Variant
Set f = Application.FileDialog(3)
With f
.Filters.Clear
.Title = "Select Drawing"
.Filters.Add "PDF Documents", "*.pdf"
.FilterIndex = 1
.AllowMultiSelect = False
End With
If f.Show = 0 Then
Exit Sub
Else
from = f.SelectedItems(1)
Me.AcroPDF4.LoadFile "from"
End If
End Sub