Toolbarnames, localization problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Arno R

    Toolbarnames, localization problem

    Hi all

    I am using Dutch versions of MSAccess and I use code like:
    DoCmd.ShowToolb ar "Menubalk", acToolbarNo
    DoCmd.ShowToolb ar "Formulierweerg ave", acToolbarNo
    Last week when a sysadmin loaded the app on his laptop, the application errored on these lines.
    ==He was using an English/American version of Access.

    Adapting the code to the following works (also in my Dutch version):
    DoCmd.ShowToolb ar "Menu bar", acToolbarNo
    DoCmd.ShowToolb ar "Form view", acToolbarNo

    I know that to avoid this problem it is best to *not* use a localized version but...
    Is there a way to use constants instead of the 'localised' name ? If so, how to find the constants ??
    Another way to avoid this problem ??

    Arno R


  • lyle fairfield

    #2
    Re: Toolbarnames, localization problem

    "Arno R" <arracomn_o_s_p _a_m@planet.nlw rote in
    news:47c00a24$0 $25482$ba620dc5 @text.nova.plan et.nl:
    Hi all
    >
    I am using Dutch versions of MSAccess and I use code like:
    DoCmd.ShowToolb ar "Menubalk", acToolbarNo
    DoCmd.ShowToolb ar "Formulierweerg ave", acToolbarNo
    Last week when a sysadmin loaded the app on his laptop, the
    application errored on these lines. ==He was using an
    English/American version of Access.
    >
    Adapting the code to the following works (also in my Dutch version):
    DoCmd.ShowToolb ar "Menu bar", acToolbarNo
    DoCmd.ShowToolb ar "Form view", acToolbarNo
    >
    I know that to avoid this problem it is best to *not* use a localized
    version but... Is there a way to use constants instead of the
    'localised' name ? If so, how to find the constants ?? Another way to
    avoid this problem ??
    >
    Arno R
    In Access 2007

    Debug.Print Application.Men ubar
    gives me the name of the default application menubar for that appplication.

    Dim z As Long
    For z = 1 To CommandBars.Cou nt
    Debug.Print z, CommandBars(z). Name
    Next z
    gives me the ordinal and name of [some or all?] of the various toolbars and
    menubars in the application.

    Having noted that item 19 is "Menu Bar" and that item 18 is "ESOII" (or
    vice versa) I can toggle their visibility by pointing to their ordinal as:
    With CommandBars
    .Item(19).Visib le = .Item(18).Visib le
    .Item(18).Visib le = Not .Item(19).Visib le
    End With

    I have a reference set to Office 12 but I !!!!!think or maybe guess!!!!!
    that that is not necessary but helps with code by providing intellisense.





    Comment

    Working...