Download the sample application, GETUSERNAME.BAS which finds the user names that is currently logged into The Raiser's Edge 7.
Follow these instructions:
- Download GETUSERNAME.ZIP to your workstation.
- Unzip GETUSERNAME.BAS
- Log into the sample Raiser's Edge database as Supervisor. The default user name is Supervisor and the default password is admin.
- Select Tools, Visual Basic for Applications from the menu bar. In the Project Explorer (Ctrl+R activates the Project Explorer), highlight System to activate the System projects.
- Select File, Import File. Browse to the location of GetUserName.bas, and click OK.
- Copy the following line of code into the Code Window:
This line of code returns the name of the user who is logged in while the macro is running. You can store this user name in a variable, a document, or a spreadsheet.
- Select File, Close and Return to The Raiser's Edge 7.
To remove the sample application, follow these instructions:
- Select Tools, Visual Basic for Applications.
- In the Project Explorer (Ctrl+R will activate the Project Explorer), highlight System to activate the System projects.
- Double-click Modules to open the directory. Right-click GetUserName and select Remove. Do not export the file first.
This application is written specifically for the sample database and may not coincide with any live database.
Disclaimer: We provide programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes you are familiar with Microsoft Visual Basic and the tools used to create and debug procedures. Our Customer Support can help explain the functionality of a particular procedure, but we will not modify, or assist you with modifying, these examples to provide additional functionality. If you are interested in learning more about the VBA and API modules, contact your account manager.