Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Property Set

Peter,

There is an error in the code, which when corrected seems to sort it (oddly
enough)

This code

Public Property Get CellRange() As Range
Set cellRangte = rangeP
End Property

should be

Public Property Get CellRange() As Range
Set cellRange = rangeP
End Property

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Peter" wrote in message
...
I created a class as below:
Private rangeP As Range
Public Property Get CellRange() As Range
Set cellRangte = rangeP
End Property
Public Property Set CellRange(ByVal p_Range As Range)
Set rangeP = p_Range
End Property
But, I have difficult to use it, my code is as below. Please advise.
Sub Button1_Click()
Dim myCell As clsCell ' declare the class
Set myCell = New clsCell ' create a object
With myCell
Set .CellRange = Range("Sheet1!A1:B10")

'assignment reuslt is Nothing, Wrong!!!
End With
End Sub

Peter



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
Forecasting Property Tax sfranger2003 Excel Discussion (Misc queries) 3 March 2nd 10 12:24 AM
Modeless property Gordon[_12_] Excel Programming 4 January 12th 04 07:40 PM
VBA: using ignoreblank property chick-racer[_29_] Excel Programming 2 November 7th 03 09:29 PM
CommandText Property Dick Kusleika[_3_] Excel Programming 0 October 17th 03 11:04 PM
property in objectplaza youngman Excel Programming 0 September 10th 03 03:53 AM


All times are GMT +1. The time now is 01:50 AM.

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"