Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Custom properties for worksheets

Is it possible to create custom properties at the worksheet level? I want
to set a property that will identify a worksheet as a particular type.

Thanks!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Custom properties for worksheets

Hi

Enter something like this on top of the (or all) sheet's module:

Public GreatSheet As Boolean

and you can set it to False or True from anywhere and read it from anywhere,
like:

Sheets(2).GreatSheet = True

Msgbox Sheets(1).GreatSheet

HTH. Best wishes Harald

"Thelonious Monk" skrev i melding
...
Is it possible to create custom properties at the worksheet level? I want
to set a property that will identify a worksheet as a particular type.

Thanks!




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Custom properties for worksheets

If the purpose is to query it with code, you might want to use a sheet level
defined name.

--
Regards,
Tom Ogilvy

"Thelonious Monk" wrote in message
...
Is it possible to create custom properties at the worksheet level? I want
to set a property that will identify a worksheet as a particular type.

Thanks!



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Custom properties for worksheets

A WS a basically a class model, so you can add either Public variables or
Property Get/Let. Also Enum and other class type constructs.
'On ThisWorkbook module
Public Enum WS_Type
WS_Basic
WS_Totals
WS_Calculation
End Enum

'On a WS module
Private mTester As WS_Type

Public Property Let Tester(vData As WS_Type)
mTester = vData
End Property

Public Property Get Tester() As WS_Type
Tester = mTester
End Property

NickHK

"Thelonious Monk" wrote in message
...
Is it possible to create custom properties at the worksheet level? I want
to set a property that will identify a worksheet as a particular type.

Thanks!




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
Custom Spreadsheet Properties Rod Excel Worksheet Functions 0 February 23rd 10 07:08 PM
Custom File Properties Ade Hodgetts Excel Discussion (Misc queries) 2 April 2nd 08 10:34 PM
Custom Class and Properties Rich_z[_30_] Excel Programming 4 July 12th 05 04:57 PM
Worksheet Custom Properties Rich_z Excel Programming 6 June 29th 05 04:49 PM
Custom Properties DavidW[_2_] Excel Programming 9 July 1st 04 03:31 PM


All times are GMT +1. The time now is 01:43 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"