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 do I do drag & drop between applications?
Is visualvm free?
___ Property is used to count no. of items in a combobox.
by writing MACRO CODE,i want to retrive data from one spead sheet to another UI (workbook). control will search cell by cell for each row and load the data in another workbook(UI). ex: custdetails custname lastname locaton mobile pincode custdetails raj tony hyd 555555 521245 servcreqrd srvce# srvcename location srvcepincode servcreqrd 754 drilling hyd 521784 for the above example in the another workbook retrive data like this custname Raj srvce# 754 srvcepincode 521784. while retrieving data control will search cell by cell for each row.
Is visual basic c#?
How do I make my applications screen-resolution independent?
Difference between DDE and OLE.
What is the use of command Object?What are the various types of variables?
Is it possible to Access BackEnd procedures?
Explain about ADO control?
What is "Reserved Error -1209"?
Is the Variant type slower than using other variable types?
How would you create properties by using class Builder Wizard?
How do you change the system menu (on the Control-Menu Box)?
What is ado in vb?