PC Review


Reply
Thread Tools Rate Thread

Compile Error:Invalid use of property

 
 
New Member
Join Date: Oct 2011
Posts: 1
 
      6th Oct 2011
I am trying to set up a data entry box for entering names and division. But it gives me an Compile error: Invalid use of property at the Clear controls "TextName.Text". I am very new at this so it may sound like a simple question. Thanks in advance!

Private Sub OKButton_Click()
' Make sure sheet one is active
Sheets("Sheet1").Activate

' Determine the next empty row
Dim NextRow As Long
NextRow = Application.WorksheetFunction.CountA(Range("A:A")) + 1
' Transfer the name
Cells(NextRow, 1) = TextName.Text

' Transfer the division
If OptionAdult Then Cells(NextRow, 2) = "Adult"
If OptionYouth Then Cells(NextRow, 2) = "Youth"
If OptionPeewee Then Cells(NextRow, 2) = "Unknown"

' Clear the controls for the next entry
TextName.Text ""
OptionPeewee = True
TextName.SetFocus
End Sub
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:11 PM.