How to Change an Application Title in VBA

Written by alexander gokhfeld
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Change an Application Title in VBA
VBA scripts allows users to change parameters of Microsoft Office applications. (Jupiterimages/ Images)

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.

Skill level:


  1. 1

    Click "Start" in Windows, and then click "Microsoft Visual Basic for Applications."

  2. 2

    Click "Form" on the Access toolbar, and then double-click on the "BasCaption." Enter "Product Orders" in the "AppTitle" property field.

  3. 3

    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.


    End Sub

  4. 4

    Click the "Set New Caption" button on the form to change the title of your Access application.

  5. 5

    Click "File" followed by "Save" to apply the change to the title of your Access database window.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.