473,326 Members | 2,732 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

how to connect excel to vb

4
hi i have written one progrm in vb but i want its output in excel but i am not able to coonect excel to vb so plz help me
May 11 '07 #1
8 8242
Killer42
8,435 Expert 8TB
hi i have written one progrm in vb but i want its output in excel but i am not able to coonect excel to vb so plz help me
You need to add Microsoft Excel n.n Object Library in your project references.
May 11 '07 #2
SammyB
807 Expert 512MB
hi i have written one progrm in vb but i want its output in excel but i am not able to coonect excel to vb so plz help me
Which VB? VBA (which application), VB6, or VB.NET? Do you want to use ADO or access Excel directly?
May 11 '07 #3
giriab
4
Which VB? VBA (which application), VB6, or VB.NET? Do you want to use ADO or access Excel directly?
vb6 and i want to access excel directly
May 11 '07 #4
giriab
4
You need to add Microsoft Excel n.n Object Library in your project references.
how to add the object library
May 11 '07 #5
SammyB
807 Expert 512MB
how to add the object library
No VB6 here, but it maybe the Tools, References menu. Maybe even Ctrl R. In any case, it's the References or Add References menu. Here's a thread with some of the objects you'll need, http://www.thescripts.com/forum/thread641830.html
May 11 '07 #6
Killer42
8,435 Expert 8TB
No VB6 here, but it maybe the Tools, References menu. Maybe even Ctrl R. In any case, it's the References or Add References menu...
It's under Project | References.
May 12 '07 #7
SammyB
807 Expert 512MB
It's under Project | References.
How quick we forget!
May 12 '07 #8
CaptainD
135 100+
hi i have written one progrm in vb but i want its output in excel but i am not able to coonect excel to vb so plz help me

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command1_Click()
  2. Dim oXLApp As Excel.Application
  3.  
  4. Dim strPath As String
  5. strPath = "PathToWorksheet"
  6. Set oXLApp = New Excel.Application
  7. Set oxlBook = oXLApp.Workbooks.Open(strPath)
  8. Set Worksheet = oXLApp.Worksheets(1)
  9.  
  10. oXLApp.Visible = True  'If you want to open the workbook
  11.  
  12. End Sub
  13.  
May 12 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

20
by: Mr Dygi | last post by:
Hi, PHP 4.3.4 installed manually from package *.zip and Apache 2. I have a problem with this simple code: <?php $link = mysql_connect("127.0.0.1","","") or die("Could not connect: " ....
2
by: John J. Lee | last post by:
Dear, I have problems when I get the IDispatch with pythoncom.connect(). When I called the 'Excel.Application' with it, it worked. (At least I can see the pythoncom.connect() is working for the...
1
by: cybertof | last post by:
Hello, Is there a way to connect (through automation) a c# application to a running Excel 2003 instance on a specific workbook ? In the past, i used to use GetObject(...) function in VB6. ...
3
by: hkappleorange | last post by:
I connect to mdb file using the following codes. How should I modify it if I want to connect to Excel instead ? <%@ Import Namespace="System.Data.OleDb" %> <% Dim conAuthors As...
2
by: | last post by:
Greets, How does one connect to a local excel file using data wizard is it possible? I'm trying to connect to an excel file and populate a dataset and combo box with the data from excel TIA
8
by: danbredy | last post by:
Hi, I'm attempting to connect to an Oracle database using SQL Server 2005 Express (OS is Windows XP Professional) and having absolutely no luck. Here is the information SQL Plus gives me about...
2
by: Brian Parker | last post by:
I need to format text in cell in an Excel worksheet and I need to do this using C#. I've seen code that will set the format for the whole cell, but I just need to format one character in that...
1
by: kannabiran | last post by:
Hi everyone, Im using the C# asp.net as the front end and i need to use the Excel sheet as the back end.i want to select the records which is available in the excel sheet using query and...
0
by: =?Utf-8?B?R2Vvcmdl?= | last post by:
Hello everyone, I am learning how to use Excel to connect to other external data source (like database). What I want to do is to develop a plug-in for Excel and automatically access external...
1
by: greggui9029 | last post by:
Hi, I have some querytables using OLE DB provider in Excel workbook. Is there any way to connect to the external data programmly without refreshing querytables? i.e. I don't want to refresh Excel...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.