How do we call MS- Excel in VB?

Answers were Sorted based on User's Feedback



How do we call MS- Excel in VB?..

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

How do we call MS- Excel in VB?..

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

How do we call MS- Excel in VB?..

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

Post New Answer

More Visual Basic Interview Questions

How many images can be placed in the image list ?

2 Answers  


Difference between Dynaset and Snapshot?

0 Answers  


what is different between edit and update?

5 Answers   Wipro,


What are the properties of datacontrol?

0 Answers  


What is ADO? What are its objects ?

1 Answers  






Explain about ADO control?

0 Answers  


What is a variant data type and when would you use it?

3 Answers  


Does VB Supports OOPS Concepts? Explain..

4 Answers  


Is it possible to call backend procedures with ADO control?

1 Answers  


What are the tools in visual basic?

0 Answers  


What is difference between procedural prog. Language

5 Answers  


CONNECTIVITY OF SQL 2000 + VB USING ODBC. steps i Follow- 1) Go to Control panel-->Admintrative Tools-->Double -click Data sources(ODBC)-->click Add button-->I choose SQL server (last option), Is it right or wrong option for connecting to SQL 2000.Then a new screen appears Create a New dataSource-->in name textbox,we can write anyname--Right or wrong. suppose i enter sonia, & my server name is .,so I enter . in server & click next button-->On the Next screen i have checked the option With Sql server authentication-- >Login Id-sa, Password-->Blank-->Click next button-->Next-- >Finish-->Then I click on button Test Data source-->Mesage Comes TESTS COMPLETED SUCCESSFULLY-->OK-->OK-->Ok. These steps we have to do or not for Connectivity using ODBC. If yes,then what after these steps we have to do??Plz reply me early ??Thx in advance.

6 Answers  


Categories