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 |
Hai! , i make a project for browsing center using vb6.0 , at the time of running below mentioned error is occured so please help me for solve this problem. Error : Can't find project or library
Name some date functions?
What is binding? What are types of binding?
What are the rules which should be followed while naming a variable in VB?
What is OLE and DDE? Explain?
What is the use of ActiveX Documents?
How do I implement an incremental search in list/dir/combo/file boxes?
What is RdExecDirect?
What do you mean by Databound Controls Explain?
How would you map properties to controls by using ActiveX Control Interface Wizard?
How do I call a DLL?
Explain Get, Let, Set Properties.
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)