CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2008
    Location
    India, Bangalore
    Posts
    157

    Arrow What are macros in vb6? How to create them?

    Hi all

    I want to know what are macros in vb6.0, how to use them give me some examples on macros.

    How to do this below thing in vb6.0
    create macros for any type of MS applications in vb6.0

    please explain me with example
    and telll me website if any body know. so that i can understand every single step in macros...

    I want its basic idea and simple examples for it........

    Thanks
    Waiting for reply
    Seema
    Prity

  2. #2
    Join Date
    Jun 2008
    Location
    India, Bangalore
    Posts
    157

    Re: What are macros in vb6? How to create them?

    Hey friends
    plzz reply me soon

    its v urgent
    thanks
    Prity

  3. #3
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,725

    Re: What are macros in vb6? How to create them?

    You referring to VBA here, which is Visual "Basic for Applications"
    In most Microsoft office apps there is a VB built in, which is called VBA. It is simpler than VB6 in a some way, but allows to do all VB6 style programming.

    The Basic idea of a Macro as recorded in Access, for instance, is this:
    You record some functions like inputting a number, clicking the mouse on some buttons or any other action and this results in a Macro, which can be played back and runs all the recorded functions in the sequence they have been recorded.

    In truth this recording produces a small VBA program which is called the Mcro body, which is executed when the macro is played back. You can access this VBA program and make changes to it you couldn't record with the macro recorder, like putting in If Then Else statements and more.
    Also you can write macro bodies directly in VBA without recording them in the first place.
    Thes selfwritten macros can then be played back like any other within the application.

  4. #4
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: What are macros in vb6? How to create them?

    More commonly, when you are trying to figure out how to have your VB6 app do something in your app, that interacts with an Office app, use that app to record a macro. Then, open it in the Macro Editor (much like the VB6 IDE) and take a look at how THEY do it. You can usually translate statements, or ask for help here.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  5. #5
    Join Date
    Feb 2002
    Location
    Makati City, Philippines
    Posts
    1,054

    Re: What are macros in vb6? How to create them?

    You might ask yourself: "If I know how to write VBA codes, do I still need to learn Macro?"

    Well, actually you can do away with Macro but it could be a poor choice to do so. While I consider myself very good at writing VBA codes, honestly I cannot memorize all properties and functions of all objects in MS Office applications. So I use Macro to record what I intend to do then read the codes it produces -- and I will be reminded of these components. Added to it, since Macro produces VBA codes, I have less VBA codes to type.
    Marketing our skills - please participate in the survey and share your insights
    -

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured