Article ID: 884688 - Last Review: October 15, 2011 - Revision: 4.0

How to open a custom VBA user form in Microsoft Dynamics GP and in Microsoft Great Plains

System TipThis article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.
Expand all | Collapse all

INTRODUCTION

In earlier versions of Microsoft Business Solutions Great Plains, you could add a Visual Basic for Applications (VBA) user form to the Great Plains toolbar. With the release of Microsoft Business Solutions - Great Plains 8.0, this toolbar no longer exists. Instead, you must use Dexterity code to add a button to the menu bar, or you must add a Great Plains window that you will not be using to the shortcut bar. Then, you add this window to VBA. This article describes how to add a Great Plains window that you will not be using to the shortcut bar and how to add this window to VBA.

MORE INFORMATION

To add a Great Plains window that you will not be using to the shortcut bar and to add this window to VBA, follow these steps:
  1. Make your user form open on the Window Before Open event by using the following code.
    Form Name.Show
    In the code in each step, replace the Form Name placeholder with the name of your user form.
  2. Hide the Great Plains form by using the following code.
    Form Name.Hide
  3. If you want to, you can add the After Window Open event. Adding the After Window Open event closes the other window by using the following code.
    Form Name.Close
    This code opens your user form and closes the Great Plains window. If you do not add this code on the After Window Open event, the Great Plains window reappears after you close the user form.
  4. If you have more than one user form on the toolbar, you can create a new user form that has buttons. You can use these buttons to open each user form. Users can then leave this window open, or users can close it.
  5. An additional option would be to create a button on a Great Plains window that is not used. When that window opens, you can click the button that you have created to open the User Form.

APPLIES TO
  • Modifier with Visual Basic for Applications
  • Microsoft Dynamics GP 9.0, when used with:
    • Microsoft Business Solutions–Great Plains 8.0
Keywords: 
kbmbsmigrate kbhowto kbretire KB884688
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.