-
using VB6 to work with Excel
I am useing a VB6 program to open and read an Excel workbook, to do this I have selected the Reference "Microsoft Excel 11.0 Object Library" under my project references, and in my code I have the following line:
Set appEx = CreateObject("Excel.Application")
Which I belive creates the excel object. However when I try and run this I get an error of: "Compile error: Variable not defined" for the appEx =
I do not have appEx defined but then in my other programs I don't seem to have it defined either and things work ok in them. What am I missing here? what do I need other then the Excel Reference object library?
-
Do you have Option Explicit at the top of your code? If so, you must declare each variable before you use it.
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
-
Very good,
I now have appEx definded as an object and all works great.
thanks I really leaned something from this. In the past I was just "using stuff" that worked
Similar Threads
-
By AM003295 in forum VB Classic
Replies: 12
Last Post: 10-27-2011, 12:29 PM
-
By toomutch in forum VB Classic
Replies: 5
Last Post: 02-06-2009, 06:42 AM
-
By Lennie in forum VB Classic
Replies: 4
Last Post: 04-25-2008, 05:39 PM
-
By Don in forum VB Classic
Replies: 4
Last Post: 12-18-2007, 09:21 AM
-
By eranfox in forum VB Classic
Replies: 5
Last Post: 08-09-2007, 07:18 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks