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

What is DBFailError?

1 Answers  


What is the use of Scalewidth and ScaleHeight Proeperty?

1 Answers  


how to make unlimited id(1rimjim,2rimjim,3rimjim....etc) login grp chat pogram for jabber?

0 Answers  


DHTML Is used for what?

0 Answers  


Is it possible to call oracle database through ADO control or Object?

1 Answers  






Draw Sequence Modal of DAO and Explain?

0 Answers  


I want to develop a stand alone application which can communicate with the existing applications in the system. On which this application should be based on: Standard Exe, Active-X Exe, Active-X Dll.

2 Answers  


What is ActiveX? Explain.

0 Answers  


What is the need of zorder method?

1 Answers  


Why API functions are Required?

0 Answers   L&T, Wipro,


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.

0 Answers   Infotech,


What is difference between procedural prog. Language

5 Answers  


Categories