Example: quiz answers

VBA Developer's Guide

Microsoft Dynamics GP 2013 VBA developer s GuideCopyrightCopyright 2012 Microsoft Corporation. All rights of liabilityThis document is provided as-is . Information and views expressed in this document, including URL and other Internet Web site references, may change without notice. You bear the risk of using examples depicted herein are provided for illustration only and are fictitious. No real association or connection is intended or should be propertyThis document does not provide you with any legal rights to any intellectual property in any Microsoft may copy and use this document for your internal, reference , Excel, Microsoft Dynamics, Outlook, Visual Basic, Windows, and Windows Vista are trademarks of the Microsoft group of companies.

2 VBA DEVELOPER’S GUIDE Introduction Microsoft Visual Basic® for Applications, or VBA, is a standard programming language used by Microsoft® Office products, as well as by many other software providers who choose to embed VBA. Applications such as Microsoft Dynamics®

Tags:

  Developer, Guide, Basics, Vba developer s guide

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of VBA Developer's Guide

1 Microsoft Dynamics GP 2013 VBA developer s GuideCopyrightCopyright 2012 Microsoft Corporation. All rights of liabilityThis document is provided as-is . Information and views expressed in this document, including URL and other Internet Web site references, may change without notice. You bear the risk of using examples depicted herein are provided for illustration only and are fictitious. No real association or connection is intended or should be propertyThis document does not provide you with any legal rights to any intellectual property in any Microsoft may copy and use this document for your internal, reference , Excel, Microsoft Dynamics, Outlook, Visual Basic, Windows, and Windows Vista are trademarks of the Microsoft group of companies.

2 FairCom and c-tree Plus are trademarks of FairCom Corporation and are registered in the United States and other other trademarks are property of their respective disclaimerMicrosoft Corporation disclaims any warranty regarding the sample code contained in this documentation, including the warranties of merchantability and fitness for a particular agreementUse of this product is covered by a license agreement provided with the software product. If you have any questions, please call the Microsoft Dyamics GPCustomer Assistance Department at 800-456-0025 (in the or Canada) or + dateSeptember 2012 VBA developer S s in this 2 Product support .. 2 Symbols and conventions.

3 3 What s next .. 3 Part 1: Using 1: VBA Visual Basic Editor .. 7 The VBA project .. 8 Objects .. 9 Programming model .. 11 Using VBA with the Modifier .. 12 Online 12 Multiple third-party 12 Chapter 2: Programming with windows in a VBA project .. 13 Programming a window 14 Using window 15 Window open events .. 15 Window close events .. 16 Window activate events .. 17 Modal dialog events .. 17 Using window properties and methods .. 19 Chapter 3: Programming Window with window fields in your VBA project .. 23 Programming a window field 24 Using window field 25 Got focus events .. 26 User changed 27 Changed 29 Lost focus events .. 29 Using window field properties and methods.

4 31 Working with field values .. 33 Verifying field 36 Window field type reference .. 39 Chapter 4: Programming with grids in your VBA project .. 55 Programming a grid object .. 57 Types of grids .. 58iiVBA developer S GUIDECONTENTSU sing grid events .. 59 Using grid properties and methods .. 62 Chapter 5: Programming with reports in your VBA project .. 63 Using report 64 Start/End events .. 65 Band 66 Using report properties and 69 Working with report fields .. 70 Exporting data to other 72 Chapter 6: Storing Additional the 75 Structure of the 76 Working with DUOS data 77 Retrieving a DUOS data object .. 78 Deleting a DUOS data 78 Updating a DUOS data object.

5 78 DUOS properties and 79 Using the DUOS .. 80 Chapter 7: Distributing a VBA .. 87 References to external components .. 87 Distributing project files .. 88 Package 88 Package file import/export 91 Part 2: VBA Object 8: Window method .. 96 AfterActivate 97 AfterClose 98 AfterModalDialog event .. 99 AfterOpen 101 BeforeActivate 102 BeforeClose 103 BeforeModalDialog event .. 104 BeforeOpen 106 Caption 107 Changed 108 Close method .. 109 EventMode property .. 110 Height property .. 111 Hide method .. 112 IsLoaded property .. 113 Left property .. 114 Move method .. 115 Name property .. 116 VBA developer S GUIDEiiiCONTENTSOpen method .. 117 PullFocus method.

6 118 Required 120 Show method .. 121 Top property .. 122 Visible property .. 123 Width property .. 124 Chapter 9: Field 126 AfterLostFocus event .. 127 AfterUserChanged event .. 128 BeforeGotFocus 129 BeforeLostFocus event .. 130 BeforeUserChanged event .. 131 Caption 132 Changed 133 Empty property .. 134 Enabled property .. 135 Focus method .. 136 FocusSeg method .. 137 Height property .. 138 Left property .. 139 Locked property .. 140 Move method .. 141 Name property .. 142 Object 143 Parent property .. 144 Required 145 TabStop 146 Top property .. 147 Value property .. 148 ValueSeg 150 Visible property .. 151 Width property .. 152 Chapter 10: Grid event.

7 154 AfterLineGotFocus 155 AfterLineLostFocus 156 BeforeLineChange event .. 157 BeforeLineGotFocus event .. 158 BeforeLineLostFocus 159 BeforeLinePopulate 160 Changed 161 EventMode property .. 162 Hide method .. 163 Left property .. 164 Move method .. 165 Name property .. 166 Show method .. 167 Top property .. 168 Visible property .. 169 Chapter 11: Report event .. 172 BeforeAH event .. 173ivVBA developer S GUIDECONTENTSB eforeBody event .. 174 BeforePF 175 BeforePH 176 BeforeRF event .. 177 BeforeRH event .. 178 Cancel 179 End event .. 180 EventMode property .. 181 Legend 182 Name property .. 183 Start event .. 184 Chapter 12: VBAG lobal method.

8 186 DUOSO bjectExtractID method .. 187 DUOSO bjectsGet method .. 188 UserInfoGet method .. 189 Chapter 13: DUOSO bjects property .. 192 Item 193 Name property .. 194 Remove method .. 195 SortByExisting 196 Chapter 14: DUOSO bject property .. 200 Properties 201 Chapter 15: DUOSP roperties 204 Exists property .. 205 Item 206 Remove method .. 208 Chapter 16: DUOSP roperty property .. 210 Value property .. 211 Chapter 17: UserInfo 214 CreateADOC onnection method .. 215 IntercompanyID 216 SystemDatabaseName property ..217 UserDate property .. 218 UserID property .. 219 UserName A: VBA VBA 223 VBA error reference .. developer S GUIDEI ntroductionMicrosoft Visual Basic for Applications, or VBA, is a standard programminglanguage used by Microsoft Office products, as well as by many other softwareproviders who choose to embed VBA.

9 Applications such as Microsoft Dynamics GP host VBA as part of the Modifier. The tools available in the VBA environmentallow you to customize windows, fields and reports. In addition, you can attachVBA code to fields you create using the s in this manualThe VBA developer s Guide is designed to teach the basics of using VBA withMicrosoft Dynamics GP. The manual is divided into the following parts: Part 1, Using VBA, provides information on how you can program windows,window fields, grids and reports, as well as store additional application data. Part 2, VBA Object Library, provides reference information about properties,methods and events for objects in Microsoft Dynamics in mind that VBA is a powerful programming language, and a basic knowledgeof VBA programming concepts is required.

10 If you haven t worked with VBA before,we recommend you review one of the many books available that introduces remainder of the manual assumes that you are already familiar with VBA sprogramming concepts and features, as well as Microsoft Dynamics GP. It explainshow to use your existing VBA knowledge to work with the VBA capabilitiesavailable with the accounting supportTechnical support for VBA can be accessed by the following methods: Telephone support Technical Support at (888) 477-7877 between 8:00 and5:00 Central Time, Monday through Friday. International users can contactTechnical Support at (701) 281-0555. Internet VBA Technical Support is also available online throughCustomerSource or PartnerSource, and is accessible from developer S GUIDE3 INTRODUCTIONS ymbols and conventionsTo help you use the VBA documentation more effectively, we ve used the followingsymbols and conventions within the text to make specific types of informationstand s nextBefore you can begin using VBA, be sure to complete the following tasks:1.


Related search queries