这是我的代码。我有一个错误。这个错误没有引起所有的时间。有时出现错误并说远程服务器不存在。请帮我解决这个问题。
Private Sub CommandButton1_Click()
Dim sItem As String
Dim fldr As FileDialog
sItem = ""
Set fldr = Application.FileDialog(msoFileDialogFolderPicker)
With fldr
.Title = "Select"
.InitialFileName = "C:\"
If .Show = True Then
sItem = .SelectedItems(1)
Else
MsgBox ("Select a Folder")
End If
End With
End Sub