View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Sheets vs worksheet

John,

The Worksheets collection contains only worksheets. The Sheet
collection includes worksheets, chart sheet, XL4 macro sheets,
and XL5 dialog sheets. The order of the sheets in either
collection is the order in which the tabs appear in the Excel
window. You can get the name of the sheet with code like


Dim SHName As String
SHName = Worksheets(1).Name

It doesn't seem to be working


In what way is this not working?


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"John" wrote in message
...
Is there a difference with sheets(1) and worksheets(1)?

Will Name = worksheets(1) (or sheet(1)) give me the name
assigned to the worksheet?

Is the order of the worksheets the same as the displayed order
when the workbook is open?

Want to activate and work on first 16 worksheets which plop
values into the last two worksheets. I'm using:

For n = 1 to 16
Sheets(n).select
rada, rada, rada
Next

It doesn't seem to be working

thanks
John