1 pièce(s) jointe(s)
probleme macro copie cellule
Bonjour à tous
je suis débutant en macro et le langage vba oulala :calim2:je rame
Je me trouve dans une impasse, j'aimerai copie une cellule et la coller dans une zone de texte jusqu'a la tout va bien.
Mes cette cellule est modifiable, j'aimerai que la modification soit aussi pris en compte et coller dans la zone de texte.
ci-joint le dossier
cellule modif est le n°ake et le poids
Merci de votre aide :roll:Pièce jointe 183375
Voila le code VBA:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
| Sub n°ake()
'
' n°ake Macro
'
'
Range("E3:G5").Select
Selection.Copy
ActiveSheet.Shapes.Range(Array("TextBox 9")).Select
Selection.ShapeRange(1).TextFrame2.TextRange.Characters.Text = "10146 " celui la que j'aimerai modifier
Selection.ShapeRange(1).TextFrame2.TextRange.Characters(1, 6).ParagraphFormat. _
FirstLineIndent = 0
With Selection.ShapeRange(1).TextFrame2.TextRange.Characters(1, 5).Font
.Bold = msoFalse
.NameComplexScript = "+mn-cs"
.NameFarEast = "+mn-ea"
.Fill.Visible = msoTrue
.Fill.ForeColor.ObjectThemeColor = msoThemeColorDark1
.Fill.ForeColor.TintAndShade = 0
.Fill.ForeColor.Brightness = 0
.Fill.Transparency = 0
.Fill.Solid
.Size = 11
.Italic = msoFalse
.Name = "+mn-lt"
.UnderlineStyle = msoNoUnderline
.Strike = msoNoStrike
End With
With Selection.ShapeRange(1).TextFrame2.TextRange.Characters(6, 1).Font
.NameComplexScript = "+mn-cs"
.NameFarEast = "+mn-ea"
.Fill.Visible = msoTrue
.Fill.ForeColor.ObjectThemeColor = msoThemeColorDark1
.Fill.ForeColor.TintAndShade = 0
.Fill.ForeColor.Brightness = 0
.Fill.Transparency = 0
.Fill.Solid
.Size = 11
.Name = "+mn-lt"
End With
End Sub
Sub poids()
'
' poids Macro
'
'
Range("E27:G29").Select
Selection.Copy
ActiveSheet.Shapes.Range(Array("TextBox 8")).Select
Selection.ShapeRange(1).TextFrame2.TextRange.Characters.Text = "1000 "
Selection.ShapeRange(1).TextFrame2.TextRange.Characters(1, 5).ParagraphFormat. _
FirstLineIndent = 0
With Selection.ShapeRange(1).TextFrame2.TextRange.Characters(1, 4).Font
.Bold = msoFalse
.NameComplexScript = "+mn-cs"
.NameFarEast = "+mn-ea"
.Fill.Visible = msoTrue
.Fill.ForeColor.ObjectThemeColor = msoThemeColorDark1
.Fill.ForeColor.TintAndShade = 0
.Fill.ForeColor.Brightness = 0
.Fill.Transparency = 0
.Fill.Solid
.Size = 11
.Italic = msoFalse
.Name = "+mn-lt"
.UnderlineStyle = msoNoUnderline
.Strike = msoNoStrike
End With
With Selection.ShapeRange(1).TextFrame2.TextRange.Characters(5, 1).Font
.NameComplexScript = "+mn-cs"
.NameFarEast = "+mn-ea"
.Fill.Visible = msoTrue
.Fill.ForeColor.ObjectThemeColor = msoThemeColorDark1
.Fill.ForeColor.TintAndShade = 0
.Fill.ForeColor.Brightness = 0
.Fill.Transparency = 0
.Fill.Solid
.Size = 11
.Name = "+mn-lt"
End With
End Sub |