Property let / get question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 
suppose it did sount a bit like a quiz, sorry about that. It tells me that
the variable's not defined. (SheetRow that is)
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top