Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Writing COM Add In for Excel with VB6

Posted on 2011-02-27
3
Medium Priority
?
378 Views
Last Modified: 2012-05-11
Thanks to rorya I have worked through Chip Pearson's tutorial on creating COM AddIn with VB6. It's a good example of Automation Add In.

I'd need to go a little further. I read somewhere that you can create VBA code for Excel from VB6 itself. That is, so I can debug and (hopefully) have Intellisense also. Is this possible? If so can someone direct me to a learning source please?

Info: So far, I have copied and pasted VBA code from the VBE to the Class in VB6. I can make simple things like 'show a message box' work. For data access with ADO etc. (which I can do in Excel VBA) I need to be able to write my code in VB6 just like I do in VBA, test etc. (This is so that I can make a COM AddIn to work with Excel 2010)

Thanks!
0
Comment
Question by:hindersaliva
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 5

Expert Comment

by:wellous
ID: 34992623
Hi hindersaliva,
Please read Integrating with COM Applications for detailed information about how to call WCF service from VB6/VBScript client application.
http://msdn.microsoft.com/en-us/library/ms733928.aspx 
Windows Communication Foundation (WCF) services can be integrated directly into your existing code by using the WCF service moniker. The service moniker can be used from a wide range of COM-based development environments, such as Office VBA, Visual Basic 6.0, or Visual C++ 6.0.

You need to check whether the Initialize requires the parameter in this scenario. About configuration file, you need to place the binding definitions (generated by the ServiceModel Metadata Utility Tool (Svcutil.exe) in the generated client application configuration file) in the client application's configuration file. For example, for a Visual Basic 6.0 executable named CallCenterClient.exe, the configuration should be placed in a file named CallCenterConfig.exe.config within the same directory as the executable. The client application can now use the moniker.

If you have any further issues, feel free to tell us.
Brgds
Wellous
0
 
LVL 5

Accepted Solution

by:
wellous earned 2000 total points
ID: 34992658
Hi,
It's me again, also pls check these sites if you need something simple tasks.
Good luck

http://theopensourcery.com/vb12tut.htm
http://www.programmersheaven.com/mb/vba/359929/359929/applying-vb6-to-excel/
-------------------------------------------------------------------------------------------------
Also read here about how To Use ADOX with Excel Data from Visual Basic or VBA
http://support.microsoft.com/kb/303814/EN-US

Tks, Wellous
0
 

Author Closing Comment

by:hindersaliva
ID: 34992807
Simple as it was this one gave me the missing link. Perfect!

http://www.programmersheaven.com/mb/vba/359929/359929/applying-vb6-to-excel/

You guys are fantastic.
Thanks Wellous.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a serious pitfall that can happen when deleting shapes using VBA.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question