By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,165 Members | 1,928 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,165 IT Pros & Developers. It's quick & easy.

Difference between Excel.worksheet and WBook.Add.Worksheets[/B].item(1).

P: 3
Dim Appxl as Excel.application
Dim WBook as Excel.workbooks
Dim WSheet as Excel.worksheet

FileName = "c:\Temp\New.xls"

Set Appxl=CreateObject("Excel.Application")
Set WBook = Appxl.Workbooks
Set WSheet = WBook.Add.Worksheets.item(1)

Appxl.visible = true

Please tell me the actual difference between worksheet and worksheets from above program. Why we have put "s" on worksheet on seventh lines.
Jan 8 '07 #1
Share this Question
Share on Google+
1 Reply

Expert 5K+
P: 8,434
Like I said in the other post, Worksheets is a collection. The individual objects in it are of type Worksheet. It's a bit like the difference between a book and a page.
Jan 8 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.