Luni, 05 decembrie 2022
  2 Răspunsuri
  5.8K vizite
-1
Voturi
Anula
Bună, sunt nou în Macros, VBA și Kutools.

Rulez o macrocomandă pentru a extrage text, apoi numere în celule separate. Kutools funcționează bine când îl rulez, totuși când urmez același proces pentru a crea o macrocomandă, primesc un mesaj de eroare:

Windows("KutoolsHelper.xlam"). Vizibil = Adevărat

Acesta pare să fie locul unde apare eroarea în depanare.

Am adăugat Kutoolsforexcel în Instrumente/Referință


Sub ConvetYardsToMiles()
'
Macro-ul ConvetYardsToMiles
'

'
Coloane(„I:I”).Selectați
Selectare.Copiere
Selection.Insert Shift:=xlToRight
Application.CutCopyMode = Fals
Selectare.Copiere
Selection.Insert Shift:=xlToRight
Coloane(„J:J”).Selectați
Windows("KutoolsHelper.xlam"). Vizibil = Adevărat
ActiveWindow.Visible = Fals
Coloane("K:K").Selectați
Windows("KutoolsHelper.xlam"). Vizibil = Adevărat
ActiveWindow.Visible = Fals
ActiveWindow.SmallScroll ToRight:=1
Interval("L2").Selectați
ActiveCell.FormulaR1C1 = "=IF(RC[-2]=""mi"",RC[-1],RC[-1]/1760)"
Interval("L2").Selectați
Selection.AutoFill Destination:=Range("L2:L832")
Interval("L2:L832").Selectați
Coloane("L:L").Selectați
Selection.NumberFormat = „0.00 mile”
Coloane("L:L").Selectați
Coloane("L:L").EntireColumn.AutoFit
Selection.ColumnWidth = 14.91
Interval("L1").Selectați
ActiveCell.FormulaR1C1 = „Mile parcurse”
Interval("L2").Selectați
ActiveWindow.SmallScroll ToRight:=-1
Coloane("H:K").Selectați
Selection.EntireColumn.Hidden = Adevărat
ActiveWindow.SmallScroll ToRight:=-4
Coloane("L:L").Selectați
Cu Selectie
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlCenter
.Orientare = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = Fals
.ReadingOrder = xlContext
.MergeCells = False
Se termina cu
Cu Selectie
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.Orientare = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = Fals
.ReadingOrder = xlContext
.MergeCells = False
Se termina cu
Rânduri ("1:1").Selectați
Interval ("C1").Activare
Selection.Font.Bold = Fals
Selection.Font.Bold = Adevărat
Cu Selectie.Font
.Nume = „Arial”
.Strikethrough = Fals
.Superscript = Fals
.Indice = Fals
.OutlineFont = Fals
.Umbra = Fals
.Underline = xlUnderlineStyleNone
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
Se termina cu
Cu Selectie.Font
.Nume = „Arial”
.Dimensiune = 12
.Strikethrough = Fals
.Superscript = Fals
.Indice = Fals
.OutlineFont = Fals
.Umbra = Fals
.Underline = xlUnderlineStyleNone
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
Se termina cu
Cu Selectie
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = Fals
.Orientare = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = Fals
.ReadingOrder = xlContext
.MergeCells = False
Se termina cu
End Sub
1 ani în urmă
·
#3346
0
Voturi
Anula
AM ACEEAȘI PROBLEMĂ CU ACEASTĂ LINIE DE COD:

Windows("KutoolsHelper.xlam"). Vizibil = Adevărat

Este permis să apelați o macrocomandă Kutools dintr-o altă macrocomandă înregistrată?
  • Pagina:
  • 1
Nu există răspunsuri făcute pentru acest post.