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"

If CommonDialog1.FileName <> "" Then
Open CommonDialog1.FileName For Input As #1
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"
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 ^^

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 :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.