By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,471 Members | 722 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,471 IT Pros & Developers. It's quick & easy.

set icon and titlebar name using vba

P: n/a


I want to set access application icon and titlebar name using VBA.

*** Sent via Developersdex http://www.developersdex.com ***
Oct 25 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a

x taol wrote:
I want to set access application icon and titlebar name using VBA.

*** Sent via Developersdex http://www.developersdex.com ***
Straight from Access VBA Help
The following example sets the AppTitle property of the current
database and applies the RefreshTitleBar method to update the title
bar.

Sub ChangeTitle()
Dim obj As Object
Const conPropNotFoundError = 3270

On Error GoTo ErrorHandler
' Return Database object variable pointing to
' the current database.
Set dbs = CurrentDb
' Change title bar.
dbs.Properties!AppTitle = "Contacts Database"
' Update title bar on screen.
Application.RefreshTitleBar
Exit Sub

ErrorHandler:
If Err.Number = conPropNotFoundError Then
Set obj = dbs.CreateProperty("AppTitle", dbText, "Contacts Database")
dbs.Properties.Append obj
Else
MsgBox "Error: " & Err.Number & vbCrLf & Err.Description
End If
Resume Next
End Sub

Oct 25 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.