Share via

Automatically create visual basic code with wizard

Anonymous
2011-04-04T00:55:32+00:00

When i select a button and let the wizard create a selected function, the result is in macro. Is there a way to get the wizard to create the operation in visual basic as the older versions of access did?

Thanks in advance.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

4 answers

Sort by: Most helpful
  1. ScottGem 68,830 Reputation points Volunteer Moderator
    2011-04-04T14:44:03+00:00

    I'm sure there is a way, but it would have to be an enhancement programmed into the next version. There is currently no way to specify VBA over embedded macros. So your only choice at this juncture is the solution Tom offered.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2011-04-04T14:09:19+00:00

    thank you.  I am aware of that ability, but i still would prefer the power of vba vs. the macros, even though they have their plus-side.  Is there any way to change somelthing, so that the wizard creates vba code instead of the less powerful macro.  I quite often let the wizard write some of the vba code and add more code to it, as setfocus and other form validations which is limited using macros.

    Was this answer helpful?

    0 comments No comments
  3. ScottGem 68,830 Reputation points Volunteer Moderator
    2011-04-04T12:17:37+00:00

    Another reason that the Wizards are now creating Embedded Macros rather than VBA code is because it makes it more portable. If you copy a control with an embedded macro, the macro is also copied. If it has a code module that is not automatically copied.

    Was this answer helpful?

    0 comments No comments
  4. Tom van Stiphout 40,211 Reputation points MVP Volunteer Moderator
    2011-04-04T04:09:07+00:00

    If you have a macro open in design view, you can select "Convert Macros to Visual Basic" from the Design tab in the Ribbon.

    Microsoft is favoring macros versus VBA because the former works better with SharePoint web forms.

    Was this answer helpful?

    0 comments No comments