我写了以下VBScript,但我不知道错误:
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open("C:\Users\Usertest\Desktop\List.xlsx")
objExcel.Application.Visible = True
Dim finden
Set finden = Columns(1).Find(what:="example")
WScript.Echo finden.Row
objWorkbook.Close
objExcel.Close
我想在第一栏中找到“示例”一词。
我在Excel中尝试了以下代码,并且有效:
Sub suchen ()
Dim finden as Range
Set finden = Columns(1).Find(what:="example")
End Sub