I need a little help in accessing different sheets in Excel.
I have scripts to open and retrieve cell contexts located on the first sheet. How do I move to the next sheet?
set wbk = [i]you Excel workbook object[/i]
for each ws in wbk.worksheets
with ws
'do stuff to worksheet, [b]ws[/b] as the object reference
.Cells(1, 1).Value = "Hello" 'put Hello in A1 in sheet ws
end with
next
Skip, [red]Be advised:[/red] When transmitting sheet music... If it ain't baroque, don't fax it!
Thanks
You'll have to hold my hand on this one.
What I have so far is :
Set objXL = WScript.CreateObject("Excel.Application")
objXL.Visible = FALSE
objXL.Workbooks.Open(<path to xls file>)
Where does "set wbk = you Excel workbook object" fit in?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.