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
How many File System Controls are there Explain?
How do I force a file dialogue box to reread the currect disk?
Clear property is available in ____,___ control.
What is FireHouse Cursors?
Why visual basic is used?
____ property is used to lock a textbox to enter a datas.
Is it possible to change menu runtime using API? If yes? Specify the function names.
I have several megabytes of memory. Why do I get an "out of memory" error?
Types of Resultsets.
Explain the types of Views in Listview Control?
How would you Create a Query Builder and Explain its uses
What is visual basic used for?
what are the Types of cursors in RDO?
Explain the types of Views in Listview Control.
What are the different procedures associated with the object?