如何修复8行VBScript中的运行时错误(在Excel VBA中有效)

时间:2019-03-28 09:18:02

标签: vbscript

我写了以下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

0 个答案:

没有答案