以下是我從另一個網站獲得的一些代碼,但我無法理解<>
標誌的作用。有人可以解釋嗎?「<>」運算符是什麼意思?
Dim FldrPicker As FileDialog
Application.ScreenUpdating = False
Application.EnableEvents = False
Application.Calculation = xlCalculationManual
Set FldrPicker = Application.FileDialog(msoFileDialogOpen)
With FldrPicker
.Title = "Select folder:"
.AllowMultiSelect = False
If .Show <> -1 Then GoTo NextCode
myPath = .SelectedItems(1) & "\"
End With
它檢查'FldrPicker.Show'是否= -1 –
<>表示「不等於」 –
非常感謝@ShaiRado和haseena! – farahxx