4 Replies - 2080 Views - Last Post: 14 January 2009 - 09:16 AM Rate Topic: -----

#1 barca payne  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 27
  • Joined: 09-December 08

how do I use C++ to program in visual basic (excel)

Posted 13 January 2009 - 12:07 PM

I remember someone saying that you could use C++ to program visual basic programs I just wondering if anyone less here know what the program/compiler's name is. if there are many is there one that is simple to use that look like the normal C++ compliers

as I need it to do a college projected in excel

thanks
Is This A Good Question/Topic? 0
  • +

Replies To: how do I use C++ to program in visual basic (excel)

#2 matthew180  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 51
  • View blog
  • Posts: 202
  • Joined: 07-January 09

Re: how do I use C++ to program in visual basic (excel)

Posted 13 January 2009 - 12:28 PM

What you just said was something like "How can I use English to speak in Spanish?"

What are you trying to do? The MS Office apps (which includes Excel) support VBA (Visual Basic for Applications) and maybe even .NET code now. If that is the case, then whoever you were talking to might have been trying to explain how all the .NET "languages" compile to bytecode that the .NET runtime can run. So it does not matter if you use Visual Basic, C#, etc. they all become .NET bytecode. However, I do *not* think (I'm not 100% sure) Visual C++ can be compiled to run on .NET. I code C++ on Windows and all my apps are stand along .exe files that run against the win32 API.

If you are supposed to do something in Excel, you probably need to start with VBA.

Matthew
Was This Post Helpful? 0
  • +
  • -

#3 perfectly.insane  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 70
  • View blog
  • Posts: 644
  • Joined: 22-March 08

Re: how do I use C++ to program in visual basic (excel)

Posted 13 January 2009 - 09:00 PM

The Office applications also support COM addins, which can be written in any language that supports the requirements for COM in the particular case (which includes, and most often is, C++). Excel also supports .XLL modules (renamed DLL modules), which are created using the XLL SDK (which is based on C, I believe).
Was This Post Helpful? 0
  • +
  • -

#4 no2pencil  Icon User is online

  • Head MFIC
  • member icon

Reputation: 5061
  • View blog
  • Posts: 26,434
  • Joined: 10-May 07

Re: how do I use C++ to program in visual basic (excel)

Posted 13 January 2009 - 09:04 PM

You could write a handy function in C/C++ & compile it as a DLL. Then load that DLL into VB.
Was This Post Helpful? 0
  • +
  • -

#5 barca payne  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 27
  • Joined: 09-December 08

Re: how do I use C++ to program in visual basic (excel)

Posted 14 January 2009 - 09:16 AM

found the post it's supposed to work though using the Excel API
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1