Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,045
Default For Each Type mismatch

On Mon, 11 Apr 2011 13:31:54 -0400, "Rick Rothstein" wrote:

Any insight as to why the Enumerations for xlSheetType
don't seem to match what is in Help? In particular, both
the regular macro sheets and chart sheets return a type
of 3? And the xlDialogSheet type doesn't support the
Type property.


I'm not sure what an xlDialogSheet is (apparently if is a left-over from
Excel 5.0 which is before my time with Excel), so I cannot address that one.
Does anyone still use them?

As for your Help file question... let's be nice to Microsoft and simply say
that sometimes they are wrong.<g

I did notice that the Type for Macro and Chart sheets both evaluate to 3...
that is definitely confusing as they are obviously different things
completely. Sorry, I don't have insight as to why; but at least their
collections are independent and individually enumerable, so that leaves an
option to get around the problem.

Rick Rothstein (MVP - Excel)


The Dialog sheets were replaced by userforms, but they were useful back in the day. I suppose they are only used now by those who have to maintain "legacy" systems.

Thanks for confirming my finding that the Help documentation is wrong.

For some purposes, one could also use the TypeName function. That function classifies both kinds of Macro sheets as Worksheet; but seems to identify a DialogSheet and a Chart satisfactorily.

Microsoft? Wrong? And here I thought it was "by design" :-|

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
Type mismatch: array or user-defined type expected Naftas Excel Programming 0 March 23rd 10 12:38 PM
Type Mismatch: array or user defined type expected ExcelMonkey Excel Programming 4 July 6th 06 03:40 PM
Type mismatch using rnge as Range with Type 8 Input Box STEVE BELL Excel Programming 11 December 3rd 05 05:02 AM
Help: Compile error: type mismatch: array or user defined type expected lvcha.gouqizi Excel Programming 1 October 31st 05 08:20 PM


All times are GMT +1. The time now is 05:44 PM.

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

About Us

"It's about Microsoft Excel"