Consulting

Results 1 to 13 of 13

Thread: program to code VBA

  1. #1
    VBAX Regular
    Joined
    Apr 2006
    Posts
    7
    Location

    Exclamation program to code VBA

    is there a software program out there that will write a vba code? I have not experience with vba and need to write code. The same way frontpage design view will write html, i need to find a software that will populate all the vba code. I don't have the time to learn vba fluently...can someone help me!!...

  2. #2
    VBAX Contributor
    Joined
    Jul 2005
    Posts
    169
    Location
    Try record the macro and hit Alt + F11 to see the code generated...

  3. #3
    VBAX Regular
    Joined
    Apr 2006
    Posts
    7
    Location
    i know you can record a macro, but im talking about the actual vba code itself...Such as, you push a button and the information from a query or spreadsheet appears in the text box below sorted a -> z. Something like that...

  4. #4
    VBAX Regular
    Joined
    Apr 2006
    Posts
    7
    Location

    re:

    is there program i can instruct it what i want and it will write the code...

  5. #5
    VBAX Mentor Marcster's Avatar
    Joined
    Jun 2005
    Posts
    434
    Location
    Hi tbucki,
    The macro recorder will record any actions you make in Excel.
    To see the VBA code that it generates, open the VBE (Visual Basic Editor)
    by pressing Alt + F11.

    Is this what your after?.

    Marcster.

  6. #6
    VBAX Regular
    Joined
    Apr 2006
    Posts
    7
    Location

    Exclamation re

    no...i don't need it to record the steps i do...i need a program that will bacisally write a complete vba program...ie with while loops, variables, ect...

  7. #7
    It seems to me that the macro recorder pretty much does what you want. You tell it what you want by going through the steps. It will actually generate more than you need in an efficient macro, but the functionality should be there complete with "Sub" and "End Sub" statements. Are you looking for a set of standard macros that you will use over and over again, or will each macro be new. It seems to me that you will need a very complicated code generator that will have a complex set of questions to prompt you for all the details of what you want the generated macro to do.
    You might be able to find code generators for special purpose applications, like creating a menu or dropdown list. Can you give some examples of what you want the macros to do?

  8. #8
    VBAX Regular
    Joined
    Apr 2006
    Posts
    7
    Location

    Exclamation reply

    i got this from a book but say i did not have the book how could i interact with a program that would basically write this for me:

    Sub sayhello()
    'display the message box
    Results = MsgBox("Click a Button", vbYesNoCancel, "A Message")
    'see which button the user clicked
    MsgBox Results
    ' end the program
    End Sub
    Sub sayhello2()
    ' show that we are using sub hello part 2
    MsgBox "We're in Sayhello2!!"
    ' call say hello
    sayhello
    End Sub

    is there a program that i can input instructions or definitions of what i want to accomplish and have the program generate this code for me...basically what i am looking for is a program that acts like a user interface for vba the same way that microsoft frontpage has a design view that allows users to interact with it without having to know anything about html. i tell iit what i want to do and it writes the code for me...

  9. #9
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    I am not aware of any VBA code generators and I doubt that any exist. If you need a complex program that is beyond the recorder then I'm afraid you will have to write it yourself - in VBA. Are you a programmer in another language at all?
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

  10. #10
    VBAX Regular
    Joined
    Apr 2006
    Posts
    7
    Location

    Exclamation re:

    no i am not a programmer at all that why i am wondering if there was something out there than can do this sort of stuff...is there a program out there that will let me embed a marco recorder in a software that uses vba but has no marco recorder...??

  11. #11
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    Quote Originally Posted by tbucki1
    is there a program out there that will let me embed a marco recorder in a software that uses vba but has no marco recorder...??
    I very much doubt it. What application are you using?
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

  12. #12
    VBAX Regular
    Joined
    Apr 2006
    Posts
    7
    Location

    Exclamation re:

    you wouldn't have heard of it but The software company that work for has embeded vba into their software and contains no record macro option...

  13. #13
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    Well the core VBA language is pretty small (although it comes with a good library of functions) and a large part of any code is references of one sort or another to the object model of the parent application.

    Your employer would seem to be the best source of information on the object model. And if you're not a programmer of any sort it's going to be pretty difficult for anybody here to really help you very much. I think you're going to need some training - perhaps you have some available in-house.

    I would recommend that your company try to make a "record macro" facility available. It is a really useful tool which gives a lot of power to non-expert users without forcing them to learn programming (as you're perhaps seeing for yourself now). It also helps programmers become familiar with the object model so that they, too, can become more productive.
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •