Can i help U ?

Need to get information into the Order .

Recommended Answers

All 4 Replies

Hi, tran.duy.77, welcome at DaniWeb!
Yes, you can help us. Could you elaborate on your question?

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    Dim MyExcel As New Excel.Application

    MyExcel.Workbooks.Add()

    MyExcel.Range("A1").Activate()

    MyExcel.ActiveCell.FormulaR1C1 = TextBox1.Text

    MyExcel.Range("B1").Activate()
    MyExcel.ActiveCell.FormulaR2C2 = TextBox2.Text
    MyExcel.Visible = True

End Sub

MyExcel.Range("B1").Activate ?

You need to add a woksheet to the worbook.
No need to activate.
Do something like MyExcel.Myworksheet.Cells(1,1).Value=TextBox1.Text;

Be a part of the DaniWeb community

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