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
Can you tell me the properties of the controls?
What is the use of debug Window?
How can you check whether a record is valid record or Invalid record using ADO control or Object?
___,___ and __ are difference between image and picture controls.
How would you attach an ActiveX control in Your Application?
___ property used to add a menus at runtime.
What are the different procedures associated with the object?
which method used to move a recordset pointer in nth position in DAG?
What is the default model of the form?
What language does visual basic use?
What do you mean by Databound Controls Explain?
Is it possible to set a shortcut key for label?
What is OLEDB?
State about the different types of visual basic data?
What is DBSqlPassThrough?