How do we call MS- Excel in VB?
Answers were Sorted based on User's Feedback
Answer / raghunath paul
after selecting Microsoft excel library in refrence
section we can create object for excel by CreateObject
("Excel.Application")
Is This Answer Correct ? | 7 Yes | 0 No |
Answer / 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 |
Answer / anjani
For Using Excel in Vb,we have to add reference of Microsoft
Excel libery. After That we can create object for excel and
we can able to use Excel in vb
Is This Answer Correct ? | 2 Yes | 0 No |
What is meant by building a recordset.
Whether HTML supports multimedia: and document links?
What is the max size of textbox?
What is view Port?
What is the use of Visual Basic Document file?
How do I play MID, WAV or other multimedia files?
How many MDI(multiple document interface) forms can include in one project(especially in visual basic)?
How to register a component?
What do you mean by ADO?
What is meant by Establish Connection in RDO?
Under which circumstance does a VB application ignore a Timer event?
How to find size of the file. Which method or function is used to occomplish this?