0

Hi all,
i'm newbie in vb,
and i wanna learn a lot from u guys,

i try to run this code,

Dim linetext As String
Private Sub open_Click()
CommonDialog1.Filter = "Text files{*.txt)|*.txt"
CommonDialog1.ShowOpen

If CommonDialog1.FileName <> "" Then
Open CommonDialog1.FileName For Input As #1
Do
Input #1, linetext
Text1.Text = Text1.Text & linetext
Loop Until EOF(1)
End If
Close #1
End Sub
Private Sub save_Click()
CommonDialog1.Filter = "Text files{*.txt)|*.txt"
CommonDialog1.ShowSave
If CommonDialog1.FileName <> "" Then
Open CommonDialog1.FileName For Output As #1
Print #1, Text1.Text
Close #1
End If
End Sub

and appeared--> run-time error '424' : Object required
what does it mean?
and how to solve that problem?

thanks a lot before, i appreciate any help ^^

1
Contributor
1
Reply
2
Views
8 Years
Discussion Span
Last Post by magenta_lover
0

finally, i found the answer by myself,

just setting the components for Microsoft Common Dialog in Control tab, and then it's run ^^

wow, glad to solved it :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.