Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default Create DLL in Visual Studio 2005 accessible by Excel 2002

I am trying to create a DLL in Visual Studio 2005-Visual Basic that contains
custom functions. I believe I need to use COM interop to allow VBA code in
Excel 2002 to access it. I've studied everything I can find on COM Interop
and .NET. I've also tried many of the 'Walkthroughs' on the MSDN site
relating to COM add-ins, .NET and Office XP but am unable to get even these
working in Excel 2002 or Word 2002.

I've installed the Office XP PIA's; I have Office XP SP3 installed; I'm
developing on a Windows XP Pro SP2 system.

Specifically the article, "How To Build an Office COM Add-in by Using Visual
Basic .NET" located at http://support.microsoft.com/kb/302896/, doesn't
function in Excel 2002. It does work in Access 2002 and PowerPoint 2002,
however so I believe the Add-in is being correctly registered in the GAC.

When I start Excel, I get no 'connect' message and no button but excel
starts without error. I get no 'disconnect' message on closing Excel,
either. The behavior is the same in Word. Also, After the Word or Excel
starts, the
"HKEY_CURRENT_USER\Software\Microsoft\Office\[OfficeApp]\Addins\[ProgID]\LoadBehavior"
registry entry changes from a 0x03 to a 0x02. This doesn't happen in Access.

I don't even care about the commandbar buttons for my purposes; I just want
to have access to my custom functions.

Any suggestions?

PS Some of the references I've researched a

INFO: Develop Microsoft Office solutions with Visual Studio .NET
http://support.microsoft.com/kb/311452/EN-US/

Office XP Primary Interop Assemblies Known Issue
http://msdn.microsoft.com/library/de..._piaissues.asp

Walkthrough: Creating COM Objects with Visual Basic 2005
http://msdn2.microsoft.com/en-us/library/x66s8zcd.aspx

COM Interoperability in .NET Framework Applications
http://msdn2.microsoft.com/en-us/library/e7a79b4y.aspx

And many others...
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Create DLL in Visual Studio 2005 accessible by Excel 2002

Did you see this one...
'--------------------------------
http://msdn.microsoft.com/library/de...erOverview.asp
"To run Visual Studio 2005 Tools for Office solutions,
you must install the following software on the each user's computer:
....A version of Word 2003, Excel 2003, or Outlook 2003 that supports
Visual Studio 2005 Tools for Office..."

'------------------------------------------------------

Note: Visual Studio "Visual Basic" is not Visual Basic.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Steve"
wrote in message
I am trying to create a DLL in Visual Studio 2005-Visual Basic that contains
custom functions. I believe I need to use COM interop to allow VBA code in
Excel 2002 to access it. I've studied everything I can find on COM Interop
and .NET. I've also tried many of the 'Walkthroughs' on the MSDN site
relating to COM add-ins, .NET and Office XP but am unable to get even these
working in Excel 2002 or Word 2002.

I've installed the Office XP PIA's; I have Office XP SP3 installed; I'm
developing on a Windows XP Pro SP2 system.

Specifically the article, "How To Build an Office COM Add-in by Using Visual
Basic .NET" located at http://support.microsoft.com/kb/302896/, doesn't
function in Excel 2002. It does work in Access 2002 and PowerPoint 2002,
however so I believe the Add-in is being correctly registered in the GAC.

When I start Excel, I get no 'connect' message and no button but excel
starts without error. I get no 'disconnect' message on closing Excel,
either. The behavior is the same in Word. Also, After the Word or Excel
starts, the
"HKEY_CURRENT_USER\Software\Microsoft\Office\[OfficeApp]\Addins\[ProgID]\LoadBehavior"
registry entry changes from a 0x03 to a 0x02. This doesn't happen in Access.

I don't even care about the commandbar buttons for my purposes; I just want
to have access to my custom functions.

Any suggestions?

PS Some of the references I've researched a

INFO: Develop Microsoft Office solutions with Visual Studio .NET
http://support.microsoft.com/kb/311452/EN-US/

Office XP Primary Interop Assemblies Known Issues
http://msdn.microsoft.com/library/de..._piaissues.asp

Walkthrough: Creating COM Objects with Visual Basic 2005
http://msdn2.microsoft.com/en-us/library/x66s8zcd.aspx

COM Interoperability in .NET Framework Applications
http://msdn2.microsoft.com/en-us/library/e7a79b4y.aspx

And many others...
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default Create DLL in Visual Studio 2005 accessible by Excel 2002

Thank you for replying, Jim.

I don't have "Visual Studio 2005 Tools for Office", just "Visual Studio 2005
Standard Edition" and I'm trying to work with Excel 2002 so I didn't think
that it would apply.

I think life would be much easier if I was trying to work with Office 2003
because of it's .NET compatibility.

My understanding of the term "Visual Basic" is that it generally refers to
Visual Basic 6, which has no problem producing COM .DLLs. I'm trying to use
the features of Visual Basic 2005 included in Visual Studio 2005 to produce
the COM .DLL.

Any input or corrections are welcome.

"Jim Cone" wrote:

Did you see this one...
'--------------------------------
http://msdn.microsoft.com/library/de...erOverview.asp
"To run Visual Studio 2005 Tools for Office solutions,
you must install the following software on the each user's computer:
....A version of Word 2003, Excel 2003, or Outlook 2003 that supports
Visual Studio 2005 Tools for Office..."

'------------------------------------------------------

Note: Visual Studio "Visual Basic" is not Visual Basic.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Steve"
wrote in message
I am trying to create a DLL in Visual Studio 2005-Visual Basic that contains
custom functions. I believe I need to use COM interop to allow VBA code in
Excel 2002 to access it. I've studied everything I can find on COM Interop
and .NET. I've also tried many of the 'Walkthroughs' on the MSDN site
relating to COM add-ins, .NET and Office XP but am unable to get even these
working in Excel 2002 or Word 2002.

I've installed the Office XP PIA's; I have Office XP SP3 installed; I'm
developing on a Windows XP Pro SP2 system.

Specifically the article, "How To Build an Office COM Add-in by Using Visual
Basic .NET" located at http://support.microsoft.com/kb/302896/, doesn't
function in Excel 2002. It does work in Access 2002 and PowerPoint 2002,
however so I believe the Add-in is being correctly registered in the GAC.

When I start Excel, I get no 'connect' message and no button but excel
starts without error. I get no 'disconnect' message on closing Excel,
either. The behavior is the same in Word. Also, After the Word or Excel
starts, the
"HKEY_CURRENT_USER\Software\Microsoft\Office\[OfficeApp]\Addins\[ProgID]\LoadBehavior"
registry entry changes from a 0x03 to a 0x02. This doesn't happen in Access.

I don't even care about the commandbar buttons for my purposes; I just want
to have access to my custom functions.

Any suggestions?

PS Some of the references I've researched a

INFO: Develop Microsoft Office solutions with Visual Studio .NET
http://support.microsoft.com/kb/311452/EN-US/

Office XP Primary Interop Assemblies Known Issues
http://msdn.microsoft.com/library/de..._piaissues.asp

Walkthrough: Creating COM Objects with Visual Basic 2005
http://msdn2.microsoft.com/en-us/library/x66s8zcd.aspx

COM Interoperability in .NET Framework Applications
http://msdn2.microsoft.com/en-us/library/e7a79b4y.aspx

And many others...

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default Create DLL in Visual Studio 2005 accessible by Excel 2002

A responder in the dontnet.languages.vb forum helped me identify that Excel
and Word were loading v1.1 of the .NET framework instead of v2.

There is a fix for this at:
"Add-ins, smart documents, or smart tags that you create by using Microsoft
Visual Studio 2005 do not run in Office"
http://support.microsoft.com/kb/908002/

My DLL and the demo add-ins worked after installation of this download.

"Steve" wrote:

I am trying to create a DLL in Visual Studio 2005-Visual Basic that contains
custom functions. I believe I need to use COM interop to allow VBA code in
Excel 2002 to access it. I've studied everything I can find on COM Interop
and .NET. I've also tried many of the 'Walkthroughs' on the MSDN site
relating to COM add-ins, .NET and Office XP but am unable to get even these
working in Excel 2002 or Word 2002.

I've installed the Office XP PIA's; I have Office XP SP3 installed; I'm
developing on a Windows XP Pro SP2 system.

Specifically the article, "How To Build an Office COM Add-in by Using Visual
Basic .NET" located at http://support.microsoft.com/kb/302896/, doesn't
function in Excel 2002. It does work in Access 2002 and PowerPoint 2002,
however so I believe the Add-in is being correctly registered in the GAC.

When I start Excel, I get no 'connect' message and no button but excel
starts without error. I get no 'disconnect' message on closing Excel,
either. The behavior is the same in Word. Also, After the Word or Excel
starts, the
"HKEY_CURRENT_USER\Software\Microsoft\Office\[OfficeApp]\Addins\[ProgID]\LoadBehavior"
registry entry changes from a 0x03 to a 0x02. This doesn't happen in Access.

I don't even care about the commandbar buttons for my purposes; I just want
to have access to my custom functions.

Any suggestions?

PS Some of the references I've researched a

INFO: Develop Microsoft Office solutions with Visual Studio .NET
http://support.microsoft.com/kb/311452/EN-US/

Office XP Primary Interop Assemblies Known Issues
http://msdn.microsoft.com/library/de..._piaissues.asp

Walkthrough: Creating COM Objects with Visual Basic 2005
http://msdn2.microsoft.com/en-us/library/x66s8zcd.aspx

COM Interoperability in .NET Framework Applications
http://msdn2.microsoft.com/en-us/library/e7a79b4y.aspx

And many others...

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Studio 2005 johncassell[_51_] Excel Programming 2 May 9th 06 08:16 PM
browse for a .xls file then open in visual studio 2005 express edi toe Excel Programming 3 April 19th 06 07:44 AM
working with excel from visual studio 2005 express bigdaddy3 Excel Programming 0 November 3rd 05 03:14 PM
Visual Studio 2005 Tools for Office Lars Schouw Excel Programming 2 October 20th 05 06:23 AM
changing the visual basic in office 2003 to visual studio net bigdaddy3 Excel Discussion (Misc queries) 1 September 13th 05 10:57 AM


All times are GMT +1. The time now is 04:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"