0

Hi All,

Hi All,

I'm trying to execute a vbscript programme, on execution I'm getting following error, can you please help me in coming out of the problem.
"Wrong number of arguments or invalid property assignment: wsh"

CODE snippet:

Set xl=createobject("excel.application")
Set wb=xl.workbooks.open(testset)
xl.visible=true
Set wsh=wb.WorkSheets(1)  <------- ERROR is seen in this location

Thanks in Advance

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by gplkrsna
0

wsh is reserved. If you execute the following line

wscript.echo wsh

the result will be the output of the line

Windows Script Host

use another variable name.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.