Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA: Text Box Property (MASK?) (Easy Question) | Excel Programming | |||
Runtime error 380: Could not set the List property. invalid property value of listbox | Excel Programming | |||
ROWS Property question | Excel Programming | |||
Is there a Filename property in PrintOut property | Excel Programming | |||
Property question | Excel Programming |