Bonjour à tous et merci de m’accueillir dans votre site d’entraide
J’ai il y a quelques années effectué écrit sous excel avec des macros les lignes de commandes ci-dessous mais voilà en vb pas de problème même si j’écrit mal mais ca fonctionne , au travail ils m’ont enlevés la suite office pour me mettre LibreOffice mais les macros sont écrits en basic d’où mon problème.
Une âme charitable voudrais bien m’expliquer pourquoi j’ai un retour d’instruction "Erreur d’exécution BASIC.
‘423’ TintAndShade "
Rem Attribute VBA_ModuleType=VBAModule
Option VBASupport 1
Sub L_30()
L_30 Macro'
' Limitation 30'
Selection.Copy
Columns("H:H").Select
ActiveSheet.Paste
Range("H1").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "Vitesse limité"
Range("I5").Select
Columns("H:H").ColumnWidth = 12.29
Columns("H:H").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection.Font
.Color = -16776961
.TintAndShade = 0
End With
Columns("H:H").Select
Selection.Replace What:="1", Replacement:="30", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:="2", Replacement:="30", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub
Avec mers remerciements
Patrick