I'm trying to disable a button when it is clicked:
I'm getting a runtime error: "You can't disable a control while it has the focus". Do you know a way around this?Code:Private Sub submitButton_Click() Me.submitButton.Enabled = False If dataPath = "" Or skuPath = "" Then MsgBox "Please enter spreadsheet locations." Else Call importExcelData(dataPath, "data") Call importExcelData(skuPath, "skus") If validate = True Then Call generateReports End If End If End Sub
Thanks!