0
我想在我的VBA代碼更加「面向對象」。但是,我有傳遞變量通過對功能的麻煩。在這裏,我收到IsEmpty
函數上的無效限定符錯誤消息。調用在VBA子功能 - 預選賽錯誤
我怎樣才能糾正我的代碼?
Sub test_too_much_data()
If toomuchdata("Data input", "B1018") = False Then
MsgBox ("Sorry, the tool can only accomodate 1000 rows.")
Exit Sub
End If
End Sub
Function toomuchdata(sheet As String, range As Variant) As Boolean
toomuchdata = IsEmpty(Sheets("String")).range(range)
End Function
謝謝!
你在我的回答如下測試的代碼?任何反饋 ? –