473,405 Members | 2,445 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,405 software developers and data experts.

Dim rs As ADODB.Recordset code returns error "user type not defined"

Dim rs As ADODB.Recordset, cn As ADODB.Connection,objXL As New Excel.Application,objSht As Worksheet,rng As Range

are all part of some code given to me to use in a 2007 Access Database with a view to exporting 2 tables simultaneously into separate worksheets in an excel workbook. They all return error "user type not defined".

A copy of the Function is in the attached Doc- you will note I have commented out the offending code.

It is all unfamiliar to me. Am I missing a Library reference or should I also have been given a Type Statement to define them?
Attached Files
File Type: zip Function Access2Excel.zip (8.0 KB, 416 views)
Jul 27 '10 #1
2 9622
Solved my own problem by adding Library References:Microsoft Excel 12 Object Library, Microsoft ActiveXData Objects 2.8 Library
Jul 27 '10 #2
The function detailed in the original attachment does not include a process for setting the column widths in the worksheets produced. In my case I have 3 columns that I wish to set at 10, 30 and 30 pixels. Can anybody help please?
Jul 28 '10 #3

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

Similar topics

2
by: Peter | last post by:
Hello, First of all, sorry for all the code. I don't know how to explain my problem without it. I have a javascript function which can build a webpage dynamically. A striped down version of...
2
by: Netto | last post by:
**** Post for FREE via your newsreader at post.usenet.com **** When I try to use a created attribute for the tag "input", it works fine with IE 6, but it seems not to be recognized by Netscape...
9
by: Ann Huxtable | last post by:
I have the following code segment - which compiles fine. I'm just worried I may get run time probs - because it looks like the functions are being overloaded by the return types?. Is this Ok: ? ...
0
by: aj | last post by:
DB2 WSE LUW 8.1 Fixpak 5 Red Hat AS 2.1 I'm trying to set up a federated view from one DB2 database to another in the same instance on the same server. I do a: create server <SERVER> type...
2
by: forwardtrends | last post by:
I am trying to simply make a div appear and dis-appear. The code I am using is: --- if(!document.getElementById) { document.getElementById = function() {return null;}; } function...
2
by: Travich | last post by:
I have a .NET 1.1 WinForms application that used to only hit SQL Server 2000. We are now contemplating moving to SQL Server 2005. To test this, we set up a SQL Server 2005 box and installed the...
3
by: Mejmeyster | last post by:
Hi Everyone, I have a table in which one of the text fields has become too small (since it only holds 255 characters). To remedy that, I'm trying to change the data type of that field to "memo"...
10
by: jonathanemil | last post by:
Hello, I am a 1st semester Computer Science student in a Python class. Our current assignment calls for us to read a list from a file, create a 2-dimensional list from the file, and check to see...
3
by: martin DH | last post by:
I would definitely appreciate any help with this problem as soon as possible. Thanks! I have a report that should display the results of a query based on two tables (tblClient and tblResult,...
1
by: Wiseman | last post by:
Hello, I am making a web page and have included a JavaScript named crazy clock. The page displays fine in IE but not in Firefox. The event console says: "event is not defined" at line 143....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.