I just got Visual Studio.NET and am trying the following:
Dim objExcel As Excel.Application ‘ Object variable to capture Excel
Which fails with the message:
Type ‘Excel.Application’ is not defined.
What am I doing wrong?
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
Home » Forums » Developers, developers, developers » DevOps Lounge » capturing Excel (Visual Basic)
There are some notes about PIA’s at
http://msdn.microsoft.com/library/default….odc_oxppias.asp[/url]
but these are for Office XP
You’re close, Ronald. To add a reference to the appropriate library, choose Add Reference from the Project menu. Click on the COM tab, and scroll down to the Microsoft Excel 10.0 Object Library. After you’ve added it, you should stop seeing the Blue Squiggle of Terror when you type something like:
Dim oExcel as New Excel.Application()
I believe you have to have Excel 2002 installed on the machine running VS.NET, though. You can check KB Q328912 for some info on downloading the Primary Interop Assemblies, another acronym for the dyslexicon, to work with Office XP COM libraries. Good luck!
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.