IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Macros et VBA Excel Discussion :

Problèmes avec mes CommandButton [XL-2007]


Sujet :

Macros et VBA Excel

  1. #1
    Nouveau membre du Club
    Homme Profil pro
    retraite
    Inscrit en
    Décembre 2012
    Messages
    38
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : retraite
    Secteur : Transports

    Informations forums :
    Inscription : Décembre 2012
    Messages : 38
    Points : 38
    Points
    38
    Par défaut Problèmes avec mes CommandButton
    Bonjour à tous :
    J’ai créé un formulaire sur une feuille excel.
    Sur ce formulaire, j’ai 13 boutons qui me font des soucis les autres ne me posent pas ce problèmes.
    Ces 13 CommandButtons perdent la propriété (Name). Je m’explique.
    Je nomme ces CommandButtons de la manière suivante :
    1°) CommandButton
    (Name) : CommandButton_CRE_RAZ_PRIMO_ALPHA
    2°) CommandButton
    (Name) : CommandButton_CRE_RAZ_PRIMO_BRAVO
    3°) CommandButton
    (Name) : CommandButton_CRE_RAZ_PRIMO_CHARLIE
    4°) CommandButton
    (Name) : CommandButton_CRE_RAZ_PRIMO_DELTA
    5°) CommandButton
    (Name) : CommandButton_CRE_RAZ_SECUNDO_ALPHA
    6°) CommandButton
    (Name) : CommandButton_CRE_RAZ_SECUNDO_BRAVO
    7°) CommandButton
    (Name) : CommandButton_CRE_RAZ_SECUNDO_CHARLIE
    8°) CommandButton
    (Name) : CommandButton_CRE_RAZ_SECUNDO_DELTA
    9°) CommandButton
    (Name) : CommandButton_CRE_RAZ_TERTIO_ALPHA
    10°) CommandButton
    (Name) : CommandButton_CRE_RAZ_TERTIO_BRAVO
    11°) CommandButton
    (Name) : CommandButton_CRE_RAZ_TERTIO_CHARLIE
    12°) CommandButton
    (Name) : CommandButton_CRE_RAZ_QUARTO_ ALPHA
    13°) CommandButton
    (Name) : CommandButton_CRE_RAZ_QUARTO_ BRAVO

    J’enregistre à chaque creation et avant fermeture du fichier.
    A l’ouverture du fichier mes CommandButtons ont perdu la propriété (Name).

    1°) CommandButton
    (Name) : CommandButton_CRE
    2°) CommandButton
    (Name) : CommandButton1
    3°) CommandButton
    (Name) : CommandButton3
    4°) CommandButton
    (Name) : CommandButton4
    5°) CommandButton
    (Name) : CommandButton5
    6°) CommandButton
    (Name) : CommandButton6
    7°) CommandButton
    (Name) : CommandButton7
    8°) CommandButton
    (Name) : CommandButton8
    9°) CommandButton
    (Name) : CommandButton9
    10°) CommandButton
    (Name) : CommandButton10
    11°) CommandButton
    (Name) : CommandButton11
    12°) CommandButton
    (Name) : CommandButton12
    13°) CommandButton
    (Name) : CommandButton13

    MES QUESTIONS

    Pourquoi je perds cette propriété sur ces seuls boutons ?
    Ou est mon erreur
    Que puis-je faire

    MERCI DE M’ÉCLAIRER

  2. #2
    Expert éminent
    Homme Profil pro
    Inscrit en
    Août 2010
    Messages
    3 453
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Août 2010
    Messages : 3 453
    Points : 6 871
    Points
    6 871
    Par défaut
    Bonjour,

    Il est assez rare que l'on donne des noms aussi long à des objets ? Comme la racine (CommandButton_CRE_RAZ_) est la même pour tes treize boutons, pourquoi ne pas les nommer du genre :
    Btn_PRIMO_ALPHA
    Btn_PRIMO_BRAVO
    etc..?

    Hervé.

  3. #3
    Nouveau membre du Club
    Homme Profil pro
    retraite
    Inscrit en
    Décembre 2012
    Messages
    38
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : retraite
    Secteur : Transports

    Informations forums :
    Inscription : Décembre 2012
    Messages : 38
    Points : 38
    Points
    38
    Par défaut Problèmes avec mes CommandButton
    Problèmes avec mes CommandButton
    Merci de votre intérêt porté à mon petit problème.
    Je renomme mes boutons comme ci-dessous. Pour le moment cela fonctionne (Je croise les doigts)
    Je ne savais pas que la propriété avais des limites. Si il existe un tutoriels avec des précisions sur cette propriété je suis preneur.

    Voici mes nouveaux nommages
    1°) CommandButton
    (name) : CommandButtons_CRE_R_P_A
    2°) CommandButton
    (name) : CommandButtons_CRE_R_P_B
    3°) CommandButton
    (name) : CommandButtons_CRE_R_P_C
    4°) CommandButton
    (name) : CommandButtons_CRE_R_P_D
    5°) CommandButton
    (name) : CommandButtons_CRE_R_S_A
    6°) CommandButton
    (name) : CommandButtons_CRE_R_S_B
    7°) CommandButton
    (name) : CommandButtons_CRE_R_S_C
    8°) CommandButton
    (name) : CommandButtons_CRE_R_S_D
    9°) CommandButton
    (name) : CommandButtons_CRE_R_T_A
    10°) CommandButton
    (name) : CommandButtons_CRE_R_T_B
    11°) CommandButton
    (name) : CommandButtons_CRE_R_T_C
    12°) CommandButton
    (name) : CommandButtons_CRE_R_Q_A
    3°) CommandButton
    (name) : CommandButtons_CRE_R_Q_B

    Merci encore

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [FreeBSD] Problème avec mes disques durs
    Par gorgonite dans le forum BSD
    Réponses: 24
    Dernier message: 29/06/2006, 18h03
  2. problème avec mes constantes
    Par salseropom dans le forum C
    Réponses: 6
    Dernier message: 10/05/2006, 18h37
  3. [JDBC]problème avec mes id
    Par Hydre dans le forum JDBC
    Réponses: 12
    Dernier message: 29/09/2005, 14h19
  4. [std::list][find_if] problème avec mes foncteurs
    Par n!co dans le forum SL & STL
    Réponses: 12
    Dernier message: 04/02/2005, 12h56
  5. Problème avec mes tables de relation...
    Par mmike dans le forum PostgreSQL
    Réponses: 4
    Dernier message: 02/06/2003, 16h16

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo