Microsoft Visual Basic for Applications (VBA) allows users to modify a variety of parameters set in Microsoft Office applications, such as Excel spreadsheets and Access database software. The Access "ChangeAccessCaption.accdb" sample database includes the form that displays the current text in the title bar of the main Access window. The form contains the "AppTitle" property field that you need to use in the VBA script attached to your Windows application if you want to change the text in the title bar of the Access program window. By changing the title of the Access window, you can locate information in your Windows applications easier.
Click "Start" in Windows, and then click "Microsoft Visual Basic for Applications."
Click "Form" on the Access toolbar, and then double-click on the "BasCaption." Enter "Product Orders" in the "AppTitle" property field.
Enter the following code in the open window to set the "Product Orders" Access title and pass it to the "SetDBProperty" string in your Access database:
' GetTitleBar function retrieves the current Access title
Dim caption As String
caption = GetTitleBar()
Public Sub SetTitleBar(varTitle As Variant)
SetDBProperty AppTitle, caption, varTitle & ""
' Refresh the title bar to change it immediately.
Click the "Set New Caption" button on the form to change the title of your Access application.
Click "File" followed by "Save" to apply the change to the title of your Access database window.
- Photo Credit Jupiterimages/Photos.com/Getty Images
How to Change Msgbox Title in Visual Basic Excel
The various Microsoft Office applications, such as Access or Excel, include a version of the Visual Basic programming language called Visual Basic...
How to Run a Windows Application with Excel VBA
In some situations, you may want to open a second Windows application while still operating in another application such as Excel. VBA,...
How to Add a Property to a Word Document in VBA
Every Microsoft Word document contains more information than what a user explicitly types or pastes into it. The extra information appears in...