Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 718
Default Property let / get question

what's wrong with this???

Property Let DatabaseRow(Value As Long)
If SheetRow = 0 Then SheetRow = Value
End Property
Property Get DatabaseRow() As Long
DatabaseRow = SheetRow
End Property
Private SheetRow As Long

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Property let / get question

The line Private SheetRow As Long needs to come before the Property Let /
Property Get statements.

It's due to the way the compiler works.

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Rob" wrote in message
...
what's wrong with this???

Property Let DatabaseRow(Value As Long)
If SheetRow = 0 Then SheetRow = Value
End Property
Property Get DatabaseRow() As Long
DatabaseRow = SheetRow
End Property
Private SheetRow As Long



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Property let / get question

Rob,
Is it a quiz ?

NickHK

P.S. Do you get a compile error ?

"Rob" wrote in message
...
what's wrong with this???

Property Let DatabaseRow(Value As Long)
If SheetRow = 0 Then SheetRow = Value
End Property
Property Get DatabaseRow() As Long
DatabaseRow = SheetRow
End Property
Private SheetRow As Long



  #4   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 718
Default Property let / get question

suppose it did sount a bit like a quiz, sorry about that. It tells me that
the variable's not defined. (SheetRow that is)

"NickHK" wrote:

Rob,
Is it a quiz ?

NickHK

P.S. Do you get a compile error ?

"Rob" wrote in message
...
what's wrong with this???

Property Let DatabaseRow(Value As Long)
If SheetRow = 0 Then SheetRow = Value
End Property
Property Get DatabaseRow() As Long
DatabaseRow = SheetRow
End Property
Private SheetRow As Long




  #5   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 718
Default Property let / get question

It tells me that SheetRow is not defined.

"NickHK" wrote:

Rob,
Is it a quiz ?

NickHK

P.S. Do you get a compile error ?

"Rob" wrote in message
...
what's wrong with this???

Property Let DatabaseRow(Value As Long)
If SheetRow = 0 Then SheetRow = Value
End Property
Property Get DatabaseRow() As Long
DatabaseRow = SheetRow
End Property
Private SheetRow As Long






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Property let / get question

Read my post - the compiler needs SheetRow declared before using it in
Propery Let/Set

Make sure the line Private SheetRow As Long is at the top of the code


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Rob" wrote in message
...
suppose it did sount a bit like a quiz, sorry about that. It tells me
that
the variable's not defined. (SheetRow that is)

"NickHK" wrote:

Rob,
Is it a quiz ?

NickHK

P.S. Do you get a compile error ?

"Rob" wrote in message
...
what's wrong with this???

Property Let DatabaseRow(Value As Long)
If SheetRow = 0 Then SheetRow = Value
End Property
Property Get DatabaseRow() As Long
DatabaseRow = SheetRow
End Property
Private SheetRow As Long






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
VBA: Text Box Property (MASK?) (Easy Question) Mcasteel[_25_] Excel Programming 1 November 6th 04 01:08 AM
Runtime error 380: Could not set the List property. invalid property value of listbox jasgrand Excel Programming 0 October 6th 04 09:28 PM
ROWS Property question TC[_6_] Excel Programming 4 September 18th 04 03:00 AM
Is there a Filename property in PrintOut property Christian[_6_] Excel Programming 4 September 3rd 04 10:12 PM
Property question Eric Bentzen Excel Programming 1 August 5th 03 05:34 PM


All times are GMT +1. The time now is 08:20 AM.

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"