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 nuber of controls are there in form?

1 Answers  


What is the diff between the Create Object and Get object?

2 Answers  


___,___ and __ are difference between image and picture controls.

0 Answers  


which arguments will be used to run a executable program in shell function ?

1 Answers  


How can I access a record by record number?

0 Answers  






___,_____ and ____ container objects. ___ Property is to compress a image in image control. ___,___ and __ are difference between image and picture controls. To set the command button for ESC ___ Property has to be changed. ___,__,___ are the type of combo box? __ no of controls in form. OLE is used for _______ ___ is the control used to call a windows application. Clear property is available in ____,___ control. ___ Property is used to count no. of items in a combobox. ___ is a property to resize a label control according to your caption. ___ property is used to change to ___ value to access a identity column'in datacontrols. _____ is the property to ___,____,____ are valid for recordsource property of dat control. Timer control contains ________ no. of events. ____ property is used to lock a textbox to enter a datas. ____ is the difference between Listindex and Tab index. ____ property of menu cannot be set at run time. _____ collection in recordset used to assign a value from textbox to table columns without making abinding in datacontrol. ___ argument can be used to make a menuitem into bold. ___,___ arguments will be used to run a executable program in shell function ___ property used to add a menus at runtime. ___ VB constant make the menu item in centre. ___ method used to move a recordset pointer in nth position in DAG.

1 Answers   TCS,


What is meant by building a recordset.

0 Answers  


What is DBSqlPassThrough?

0 Answers  


Can you create a tabletype of recordset in Jet connected ODBC dbengine.

0 Answers  


How many system controls are available ?

1 Answers  


Explain the types of Views in Listview Control.

0 Answers  


What is data control in vb?

0 Answers  


Categories