-1
我有一個用於獲取用戶輸入的Excel-VBA用戶表單。我需要在發生錯誤時顯示此用戶表單,以便用戶可以重新定義輸入值。如何在發生錯誤時顯示用戶表單
僞代碼:
Sub()
userform.Show
Call Execute
End Sub
Sub Execute()
Validate the input
If input is wrong
MsgBox "reselect the input"
-here I need to disply the userform-
End sub
我試圖GoTo Userform
這給了我一個標籤未定義錯誤。有什麼建議麼?
你的問題是有點不清楚,不完整的,看起來像你希望我們寫太多的代碼爲您服務。如果你真的要求'On Error'解決方案搜索'[VBA] On Error GoTo'在這裏在SO或檢查[THIS LINK](http://msdn.microsoft.com/en-us/library/office/gg251688% 28V = office.14%29.aspx)。 –