I know how to open an excel spread sheet using .vbs. I have a huge list of data but I want to separate each OU on the same workbook but on different sheets. How do you access each sheet within a workbook?
I know how to open an excel spread sheet using .vbs
Any chance you could post what you have tried so far and where you're stuck.
Have a look at the Sheets collection of the Excel.Workbook object.
Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
Just browsing through some old posts and came across this one; not sure if Stephon98caffe has already solved this one or not, but just incase someone else comes across this post.
Will add one additional sheet and name all four:
Code:
Set oXLS = CreateObject("Excel.Application")
oXLS.Visible = TRUE
oXLS.Workbooks.Add
'Adds one spreadsheet to book
oXLS.ActiveWorkbook.Worksheets.Add
oXLS.Sheets(1).Name = "ONE"
oXLS.Sheets(2).Name = "TWO"
oXLS.Sheets(3).Name = "THREE"
oXLS.Sheets(4).Name = "FOUR"
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.