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 is the use of Data Form Wizard?
What about DLL calls that require callbacks?
How can Visual Basic be used for server-side scripting?
____ property of menu cannot be set at run time.
what are the Parts of ODBC?
What is the default workspace?
Explain the types of Views in Listview Control?
When/Why should I use Option Explicit?
Recordset object consists what?
Draw Sequence Modal of DAO and Explain?
Does VB support pointers to functions?
___ is the control used to call a windows application.
How can you Navigate from the DHTML application to another DHTML application? .
What are the important components of OLEDB?
What is the use of Visual Basic Document file?