Answer Posted / sugnaya
place two textbox and commandbuttons in design window
and copy this code in code window
-----------------------
Dim xl As New Excel.Application
Dim xlsheet As Excel.Worksheet
Dim xlwbook As New Excel.Workbook
Private Sub Command1_Click()
Text1.Text = xlsheet.Cells(2, 1)
Text2.Text = xlsheet.Cells(2, 2)
End Sub
Private Sub Command2_Click()
xlsheet.Cells(21, 1) = Text1.Text
xlsheet.Cells(21, 2) = Text2.Text
xlwbook.Save
End Sub
Private Sub Form_Load()
Set xlwbook = xl.Workbooks.Open("C:\Documents and
Settings\bct20vb\My Documents\sa.xls")
Set xlsheet = xlwbook.Sheets.Item(1)
End Sub
| Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
What are the Internet tools available in VB6.0?
Which language is used in visual basic?
what are the types of cursors in DAO?
How do I call help files from a VB program?
Explain about control properties?
How would you activate animation control?
What is the use of Tabledef?
I'm getting error message "Reserved Error [-nnnn] ("There is no message for this error")" from Jet Engine 2.0.Why?
What is controls in vb?
What is script control?
How can you check whether a record is valid record or Invalid record using ADO control or Object?
Why does everybody say I should save in TEXT not BINARY?
Explain about conditional operators?
Is it possible to Manipulate data through flexgrid? Explain.
What are the Differenct Types of Instancing Property in ActiveX Dll and Exe?