Method or data member not found....

04-15-2004, 02:57 PM
okay i have this program, simple log data inputed into a text file....

i get the error where there are bold lines.....

I use to program but forgot a bit, but everything i read says i should be able to type it this way

Private Sub create_Click()
'LName is lastname
'FName is firstname

Dim Lname As String
Dim FName As String
Dim Phone As String
Dim Address As String

If LastName.Text = "" Then MsgBox ("Fill in last name")
intmsg = MsgBox("strings and message loaded")[/b[
[b]Lname = (Text.LastName)
intmsg = MsgBox("Names Loaded")
Open "Lname.txt" For Output As #1
intmsg = MsgBox("File sample.txt opened")
Print #1, LastName.Text
Print #1, Fastname.Text
intmsg = MsgBox("File written")
Close #1
intmsg = MsgBox("Member sucessfully added")

End Sub

also i wants something that closes the window, not just hides it (or clears the fields when i close it....

04-15-2004, 04:45 PM
Lastname is a string, not a text box can't do lastname.text. If "LastName" is a text box control, this will work. I think you want something like this:

LastName = Text1.Text

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum