"Sheet" versus "Worksheet"

C

Chuck Taylor

When I need to switch from one worksheet to the other, I usually use
code like:

Worksheets("Sheet1").Select (or Activate)

But sometimes this just doesn't work unless I change it to:

Sheets("Sheet1").Select

Just for the sake of curosity, what's the difference between "Sheets"
and "Worksheets"? Excel help file isn't much help.

J
 
T

Tom Ogilvy

Excel has many types of sheet
Chart
Worksheets
xl4Macro Sheet
xl4 International Macro Sheet
DialogSheet
and in xl95 and xl5, Module sheets

I have never seen Sheets work where Worksheets doesn't if I am trying to
select a worksheet.
 
A

Alan

Tom Ogilvy said:
Excel has many types of sheet
Chart
Worksheets
xl4Macro Sheet
xl4 International Macro Sheet
DialogSheet
and in xl95 and xl5, Module sheets

I have never seen Sheets work where Worksheets doesn't if I am trying to
select a worksheet.

This might explain why it doesn't always / ever work for a chart sheet
though?

I guess you are saying that Excel sees them as unique or separate
objects?

Alan.
 
T

Tom Ogilvy

Sure - they are separate objects

you can't
Dim sh as sheet

You have to do
Dim sh as Object
for each sh in sheets



dim ch as Chart
for each sh in Charts


dim ws as Worksheet
for each ws in Worksheets


I don't know what you mean by doesn't work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top