Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default newbie to ClModules is this correct use of Property Set?.....

I'm just after some advice as to whether I'm heading in the correct
direction.
I'm new to class modules so just wondering if the below looks logical
+ efficient.
Any advice greatly appreciated
JasonQ.



'this is in a Class Module "myClass":
'=================================
Private R As Range
Private TR As Integer


Public Property Set TopLeftCell(ByRef sVal As Range)
Set R = sVal
TR = R.Row
End Property
Public Property Get TopLeftCell() As Range
Set TopLeftCell = R
End Property


Public Property Get TopRow() As Integer
TopRow = TR
End Property




'This is in a normal module:
'=================================
Dim X As myClass

Sub test()

Set X = New myClass
Set X.TopLeftCell = ActiveSheet.Range("AD4")

MsgBox X.TopRow

Set X = Nothing

End Sub
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
Get Property value of class instance by passing string property name [email protected] Excel Programming 2 October 19th 07 05:47 PM
Newbie question - excell format not correct memko Excel Discussion (Misc queries) 0 October 10th 07 11:09 AM
Runtime error 380 - Could not set the list property. Invalid property value. [email protected] Excel Programming 3 February 27th 07 06:35 AM
Need correct list property for coding a macro kwilson Excel Programming 1 May 15th 05 09:11 PM
Runtime error 380: Could not set the List property. invalid property value of listbox jasgrand Excel Programming 0 October 6th 04 09:28 PM


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