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

FROMATAGE TXTBOX inoperant !! HELP

  1. BARONH
    BARONH
    Bonjour,

    Je ne parviens pas à formater mes textbox en timevalue "hh:mm:ss"
    j'ai crée un USF avec txtbox alimentés par de la combobox faisant appel à des fonction Vlookup
    Les inputs en txtbox de ma combo box retourne une valeur type float
    or je voudrais pouvoir les changer en "time value" -> "hh:mm:ss"
    Précision les outils de contrôles sont dans un USF


    Merci pour votre aide ! ;-)


    Ci dessous mon code :

    1) la combo avec le code WS.Functio.VLookup
    et les inputs de sortie sur les txtbox (tbx1000, tbx5000, TBX10000,TBX15000)

    'RECHECHE-V
    Private Sub cbxPercentage_AfterUpdate()

    With Me
    .tbx1000 = Application.WorksheetFunction.VLookup(CLng(Me.cbxPercentage), Feuil1.Range("datasource2"), 11, 0)
    .tbx5000 = Application.WorksheetFunction.VLookup(CLng(Me.cbxPercentage), Feuil1.Range("datasource2"), 15, 0)
    .TBX10000 = Application.WorksheetFunction.VLookup(CLng(Me.cbxPercentage), Feuil1.Range("datasource2"), 16, 0)
    .TBX15000 = Application.WorksheetFunction.VLookup(CLng(Me.cbxPercentage), Feuil1.Range("datasource2"), 17, 0)
    .TB5_20KIL = Application.WorksheetFunction.VLookup(CLng(Me.cbxPercentage), Feuil1.Range("datasource2"), 18, 0)
    .TB6_Semi = Application.WorksheetFunction.VLookup(CLng(Me.cbxPercentage), Feuil1.Range("datasource2"), 19, 0)
    .TB7_MRTH = Application.WorksheetFunction.VLookup(CLng(Me.cbxPercentage), Feuil1.Range("datasource2"), 20, 0)

    End With
    End Sub

    2) mon code pour le formatage des TXTBOX

    Sub CB3_Click()

    'reformater les textbox en time value

    tbx1000.Value = Format(Me.tbx1000.Value, "hh:mm:ss")
    tbx5000.Value = Format(tbx5000.Value, "hh:mm:ss")
    TBX10000.Value = Format(TBX10000.Value, "hh:mm:ss")
    TBX15000.Value = Format(TBX15000.Value, "hh:mm:ss")
    TB5_20KIL.Value = Format(TB5_20KIL.Value, "hh:mm:ss")
    TB6_Semi.Value = Format(TB6_Semi.Value, "hh:mm:ss")
    TB7_MRTH.Value = Format(TB7_MRTH.Value, "hh:mm:ss")

    End Sub
Affichage des résultats 1 à 1 sur 1
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