Call ChangeProperty("AppIcon", dbText, "C:BAZYJakisPlik.ICO") Call ChangeProperty("AppTitle", dbText, "Nowy tytuł") RefreshTitleBar
Trzeba jeszcze dodać funkcje ChangeProperty(...)
. To popularna procedura,
dlatego sprawdź, czy już jej nie masz w jakimś module globalnym.
Function ChangeProperty(strPropName As String, varPropType As Variant, _ varPropValue As Variant) As Integer Dim dbs As Database, prp As Property Const conPropNotFoundError = 3270 Set dbs = CurrentDb On Error GoTo Change_Err dbs.Properties(strPropName) = varPropValue ChangeProperty = True Change_Bye: Exit Function Change_Err: If Err = conPropNotFoundError Then Set prp = dbs.CreateProperty(strPropName, varPropType, varPropValue) dbs.Properties.Append prp Resume Next Else ChangeProperty = False Resume Change_Bye End If End Function
K. P.