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
François Picalausa
"cphil" <cazenave.(suffitspam) a écrit dans le message de news:
Comment récupérer la valeur de Sheet("Feuil1!").Range("A1") dans la propiété Caption d'un Label.
Bonjour/soir,
Essaye ceci: Private Sub CommandButton1_Click() Dim objMyRange As Range Set objMyRange = ThisWorkbook.Sheets("Feuil1").Range("A1")
With objMyRange Label1.Caption = .Text Label2.Caption = .Formula Label3.Caption = .Value End With End Sub
Je te réfère à l'aide pour plus d'informations sur es spécificités de chacune des propriétés de l'objet range: http://msdn.microsoft.com/library/en-us/vbaxl10/html/xlobjRange.asp http://msdn.microsoft.com/library/en-us/vbaxl10/html/xlprovalue.asp http://msdn.microsoft.com/library/en-us/vbaxl10/html/xlproformula.asp http://msdn.microsoft.com/library/en-us/vbaxl10/html/xlprotext.asp
"cphil" <cazenave.(suffitspam)philippe@free.fr> a écrit dans le message
de news:Ocz3B7nyDHA.1356@TK2MSFTNGP10.phx.gbl
Comment récupérer la valeur de Sheet("Feuil1!").Range("A1")
dans la propiété Caption d'un Label.
Bonjour/soir,
Essaye ceci:
Private Sub CommandButton1_Click()
Dim objMyRange As Range
Set objMyRange = ThisWorkbook.Sheets("Feuil1").Range("A1")
With objMyRange
Label1.Caption = .Text
Label2.Caption = .Formula
Label3.Caption = .Value
End With
End Sub
Je te réfère à l'aide pour plus d'informations sur es spécificités de
chacune des propriétés de l'objet range:
http://msdn.microsoft.com/library/en-us/vbaxl10/html/xlobjRange.asp
http://msdn.microsoft.com/library/en-us/vbaxl10/html/xlprovalue.asp
http://msdn.microsoft.com/library/en-us/vbaxl10/html/xlproformula.asp
http://msdn.microsoft.com/library/en-us/vbaxl10/html/xlprotext.asp
"cphil" <cazenave.(suffitspam) a écrit dans le message de news:
Comment récupérer la valeur de Sheet("Feuil1!").Range("A1") dans la propiété Caption d'un Label.
Bonjour/soir,
Essaye ceci: Private Sub CommandButton1_Click() Dim objMyRange As Range Set objMyRange = ThisWorkbook.Sheets("Feuil1").Range("A1")
With objMyRange Label1.Caption = .Text Label2.Caption = .Formula Label3.Caption = .Value End With End Sub
Je te réfère à l'aide pour plus d'informations sur es spécificités de chacune des propriétés de l'objet range: http://msdn.microsoft.com/library/en-us/vbaxl10/html/xlobjRange.asp http://msdn.microsoft.com/library/en-us/vbaxl10/html/xlprovalue.asp http://msdn.microsoft.com/library/en-us/vbaxl10/html/xlproformula.asp http://msdn.microsoft.com/library/en-us/vbaxl10/html/xlprotext.asp
Merci François, grâce à ta réponse qui va au-delà de la question posée, j'en apprends davantage plus rapidement.
A+ -- -cphil-
"François Picalausa" a écrit dans le message de news:
"cphil" <cazenave.(suffitspam) a écrit dans le message de news: > Comment récupérer la valeur de Sheet("Feuil1!").Range("A1") > dans la propiété Caption d'un Label.
Bonjour/soir,
Essaye ceci: Private Sub CommandButton1_Click() Dim objMyRange As Range Set objMyRange = ThisWorkbook.Sheets("Feuil1").Range("A1")
With objMyRange Label1.Caption = .Text Label2.Caption = .Formula Label3.Caption = .Value End With End Sub
Je te réfère à l'aide pour plus d'informations sur es spécificités de chacune des propriétés de l'objet range: http://msdn.microsoft.com/library/en-us/vbaxl10/html/xlobjRange.asp http://msdn.microsoft.com/library/en-us/vbaxl10/html/xlprovalue.asp http://msdn.microsoft.com/library/en-us/vbaxl10/html/xlproformula.asp http://msdn.microsoft.com/library/en-us/vbaxl10/html/xlprotext.asp
Merci François, grâce à ta réponse qui va au-delà de la question
posée, j'en apprends davantage plus rapidement.
A+
--
-cphil-
"François Picalausa" <fpicalausa@chez.com> a écrit dans le message de
news:OCdVNisyDHA.4060@TK2MSFTNGP11.phx.gbl...
"cphil" <cazenave.(suffitspam)philippe@free.fr> a écrit dans le message
de news:Ocz3B7nyDHA.1356@TK2MSFTNGP10.phx.gbl
> Comment récupérer la valeur de Sheet("Feuil1!").Range("A1")
> dans la propiété Caption d'un Label.
Bonjour/soir,
Essaye ceci:
Private Sub CommandButton1_Click()
Dim objMyRange As Range
Set objMyRange = ThisWorkbook.Sheets("Feuil1").Range("A1")
With objMyRange
Label1.Caption = .Text
Label2.Caption = .Formula
Label3.Caption = .Value
End With
End Sub
Je te réfère à l'aide pour plus d'informations sur es spécificités de
chacune des propriétés de l'objet range:
http://msdn.microsoft.com/library/en-us/vbaxl10/html/xlobjRange.asp
http://msdn.microsoft.com/library/en-us/vbaxl10/html/xlprovalue.asp
http://msdn.microsoft.com/library/en-us/vbaxl10/html/xlproformula.asp
http://msdn.microsoft.com/library/en-us/vbaxl10/html/xlprotext.asp
Merci François, grâce à ta réponse qui va au-delà de la question posée, j'en apprends davantage plus rapidement.
A+ -- -cphil-
"François Picalausa" a écrit dans le message de news:
"cphil" <cazenave.(suffitspam) a écrit dans le message de news: > Comment récupérer la valeur de Sheet("Feuil1!").Range("A1") > dans la propiété Caption d'un Label.
Bonjour/soir,
Essaye ceci: Private Sub CommandButton1_Click() Dim objMyRange As Range Set objMyRange = ThisWorkbook.Sheets("Feuil1").Range("A1")
With objMyRange Label1.Caption = .Text Label2.Caption = .Formula Label3.Caption = .Value End With End Sub
Je te réfère à l'aide pour plus d'informations sur es spécificités de chacune des propriétés de l'objet range: http://msdn.microsoft.com/library/en-us/vbaxl10/html/xlobjRange.asp http://msdn.microsoft.com/library/en-us/vbaxl10/html/xlprovalue.asp http://msdn.microsoft.com/library/en-us/vbaxl10/html/xlproformula.asp http://msdn.microsoft.com/library/en-us/vbaxl10/html/xlprotext.asp