Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
lSteph
Bonsoir, Comment envisages-tu, toute une ligne dans un textbox? Voici un exemple un peu simpliste , http://cjoint.com/?dqwQxzqSpY j'ai mis min et max suivant lignes colonnes dans la fenêtre des propriétés pour les compteurs(SpinButton1et 2) qui varient selon i et j dans le code du userform:
'''***** Dim i As Byte, j As Long Private Sub CommandButton1_Click() ActiveCell = TextBox1 End Sub Private Sub CommandButton2_Click() Unload Me End Sub Private Sub SpinButton1_Change() i = SpinButton1 Cells(ActiveCell.Row, i).Select TextBox1 = ActiveCell Label1 = ActiveCell.Address End Sub Private Sub SpinButton2_Change() j = SpinButton2 Cells(j, ActiveCell.Column).Select TextBox1 = ActiveCell Label1 = ActiveCell.Address End Sub Private Sub UserForm_Initialize() TextBox1 = ActiveCell Label1 = ActiveCell.Address End Sub '''**** 'lSteph
"Lionel" a écrit dans le message de news: %
Salut à tous,
J'aimerai pouvoir récupérer les informations d'une ligne dans un userform (textbox) de modification.
Pourriez vous m'aider à trouver une procédure pour cela.
Merci de votre précieuse aide !
Lionel
Bonsoir,
Comment envisages-tu, toute une ligne dans un textbox?
Voici un exemple un peu simpliste , http://cjoint.com/?dqwQxzqSpY
j'ai mis min et max suivant lignes colonnes
dans la fenêtre des propriétés pour les compteurs(SpinButton1et 2)
qui varient selon i et j dans le code du userform:
'''*****
Dim i As Byte, j As Long
Private Sub CommandButton1_Click()
ActiveCell = TextBox1
End Sub
Private Sub CommandButton2_Click()
Unload Me
End Sub
Private Sub SpinButton1_Change()
i = SpinButton1
Cells(ActiveCell.Row, i).Select
TextBox1 = ActiveCell
Label1 = ActiveCell.Address
End Sub
Private Sub SpinButton2_Change()
j = SpinButton2
Cells(j, ActiveCell.Column).Select
TextBox1 = ActiveCell
Label1 = ActiveCell.Address
End Sub
Private Sub UserForm_Initialize()
TextBox1 = ActiveCell
Label1 = ActiveCell.Address
End Sub
'''****
'lSteph
"Lionel" <lionfos@a-0-l-e.com> a écrit dans le message de news:
%23QcebqTSGHA.4960@TK2MSFTNGP12.phx.gbl...
Salut à tous,
J'aimerai pouvoir récupérer les informations d'une ligne dans un userform
(textbox) de modification.
Pourriez vous m'aider à trouver une procédure pour cela.
Bonsoir, Comment envisages-tu, toute une ligne dans un textbox? Voici un exemple un peu simpliste , http://cjoint.com/?dqwQxzqSpY j'ai mis min et max suivant lignes colonnes dans la fenêtre des propriétés pour les compteurs(SpinButton1et 2) qui varient selon i et j dans le code du userform:
'''***** Dim i As Byte, j As Long Private Sub CommandButton1_Click() ActiveCell = TextBox1 End Sub Private Sub CommandButton2_Click() Unload Me End Sub Private Sub SpinButton1_Change() i = SpinButton1 Cells(ActiveCell.Row, i).Select TextBox1 = ActiveCell Label1 = ActiveCell.Address End Sub Private Sub SpinButton2_Change() j = SpinButton2 Cells(j, ActiveCell.Column).Select TextBox1 = ActiveCell Label1 = ActiveCell.Address End Sub Private Sub UserForm_Initialize() TextBox1 = ActiveCell Label1 = ActiveCell.Address End Sub '''**** 'lSteph
"Lionel" a écrit dans le message de news: %
Salut à tous,
J'aimerai pouvoir récupérer les informations d'une ligne dans un userform (textbox) de modification.
Pourriez vous m'aider à trouver une procédure pour cela.
Merci de votre précieuse aide !
Lionel
lSteph
...petite rectification pour la synchro des spinbuttons et mode d'entrée de la valeur du textbox dans les cellules:
Dim i As Byte, j As Long Private Sub CommandButton1_Click() ActiveCell.FormulaLocal = TextBox1.Value End Sub Private Sub CommandButton2_Click() Unload Me End Sub Private Sub SpinButton1_Change() i = SpinButton1 Cells(j, i).Select TextBox1 = ActiveCell Label1 = ActiveCell.Address End Sub Private Sub SpinButton2_Change() j = SpinButton2 Cells(j, i).Select TextBox1 = ActiveCell Label1 = ActiveCell.Address End Sub Private Sub UserForm_Initialize() TextBox1 = ActiveCell Label1 = ActiveCell.Address i = ActiveCell.Column j = ActiveCell.Row SpinButton1 = i SpinButton2 = j
End Sub
'lSteph "Lionel" a écrit dans le message de news: %
Salut à tous,
J'aimerai pouvoir récupérer les informations d'une ligne dans un userform (textbox) de modification.
Pourriez vous m'aider à trouver une procédure pour cela.
Merci de votre précieuse aide !
Lionel
...petite rectification pour la synchro des spinbuttons et mode d'entrée de
la valeur du textbox dans les cellules:
Dim i As Byte, j As Long
Private Sub CommandButton1_Click()
ActiveCell.FormulaLocal = TextBox1.Value
End Sub
Private Sub CommandButton2_Click()
Unload Me
End Sub
Private Sub SpinButton1_Change()
i = SpinButton1
Cells(j, i).Select
TextBox1 = ActiveCell
Label1 = ActiveCell.Address
End Sub
Private Sub SpinButton2_Change()
j = SpinButton2
Cells(j, i).Select
TextBox1 = ActiveCell
Label1 = ActiveCell.Address
End Sub
Private Sub UserForm_Initialize()
TextBox1 = ActiveCell
Label1 = ActiveCell.Address
i = ActiveCell.Column
j = ActiveCell.Row
SpinButton1 = i
SpinButton2 = j
End Sub
'lSteph
"Lionel" <lionfos@a-0-l-e.com> a écrit dans le message de news:
%23QcebqTSGHA.4960@TK2MSFTNGP12.phx.gbl...
Salut à tous,
J'aimerai pouvoir récupérer les informations d'une ligne dans un userform
(textbox) de modification.
Pourriez vous m'aider à trouver une procédure pour cela.
...petite rectification pour la synchro des spinbuttons et mode d'entrée de la valeur du textbox dans les cellules:
Dim i As Byte, j As Long Private Sub CommandButton1_Click() ActiveCell.FormulaLocal = TextBox1.Value End Sub Private Sub CommandButton2_Click() Unload Me End Sub Private Sub SpinButton1_Change() i = SpinButton1 Cells(j, i).Select TextBox1 = ActiveCell Label1 = ActiveCell.Address End Sub Private Sub SpinButton2_Change() j = SpinButton2 Cells(j, i).Select TextBox1 = ActiveCell Label1 = ActiveCell.Address End Sub Private Sub UserForm_Initialize() TextBox1 = ActiveCell Label1 = ActiveCell.Address i = ActiveCell.Column j = ActiveCell.Row SpinButton1 = i SpinButton2 = j
End Sub
'lSteph "Lionel" a écrit dans le message de news: %
Salut à tous,
J'aimerai pouvoir récupérer les informations d'une ligne dans un userform (textbox) de modification.
Pourriez vous m'aider à trouver une procédure pour cela.