Thread: Need to convert C code to VBA for Excel

  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    3

    Need to convert C code to VBA for Excel

    Hello,

    I have some c code that I need to implement into Excel to set up a hash function using the Matyas-Meyer-Oseas method. As far as I've learned thus far...Excel uses VBA for modules.

    I've found VB to C converters online...but I'm having trouble finding C to VB. Does anyone know of a way I can do this?

    Thanks much!

  2. #2
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Learn to write your own code?

  3. #3
    Registered User
    Join Date
    Nov 2010
    Posts
    3
    Wow, that's surely something I haven't thought of...

    However wonderful as that suggestion was...I'm open to other ideas that wouldn't take quite as long

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Do you know any C at all?

    Do you know how to use C in a windows environment?

    If you do, you might consider wrapping the C code inside a DLL, which you can then call directly from VB.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    Registered User
    Join Date
    Nov 2010
    Posts
    3

    no C experience

    Sorry, I don't have any C experience.

    I don't even have VB experience...but I know someone who does. So, if there is a C to VB converter out there that someone has used...I can have the VB implemented for Excel.

  6. #6
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  7. #7
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    If you do, you might consider wrapping the C code inside a DLL, which you can then call directly from VB.
    C++/CLI to the rescue....if it is VB .NET.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Convert a.out back to C code??
    By Rob4226 in forum C Programming
    Replies: 3
    Last Post: 09-16-2009, 10:33 PM
  2. Explain this C code in english
    By soadlink in forum C Programming
    Replies: 16
    Last Post: 08-31-2006, 12:48 AM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  4. Seems like correct code, but results are not right...
    By OmniMirror in forum C Programming
    Replies: 4
    Last Post: 02-13-2003, 01:33 PM
  5. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM