Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default "Sheet" versus "Worksheet"

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default "Sheet" versus "Worksheet"

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.



--
Regards,
Tom Ogilvy


Chuck Taylor wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 188
Default "Sheet" versus "Worksheet"


"Tom Ogilvy" wrote in message
...
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.



--
Regards,
Tom Ogilvy


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.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default "Sheet" versus "Worksheet"

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.

--
Regards,
Tom Ogilvy



Alan wrote in message
...

"Tom Ogilvy" wrote in message
...
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.



--
Regards,
Tom Ogilvy


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.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Excel "Move or Copy" and "Delete" sheet functions dsiama Excel Worksheet Functions 1 December 28th 07 01:57 PM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


All times are GMT +1. The time now is 03:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"