Segunda-feira, 05 2022 dezembro
  2 Respostas
  5.7 mil visitas
-1
Votos
desfazer
Olá, sou novo em Macros, VBA e Kutools.

Estou executando uma macro para extrair texto e números em células separadas. O Kutools funciona bem quando o executo, no entanto, quando sigo o mesmo processo para criar uma macro, recebo uma mensagem de erro:

Windows("KutoolsHelper.xlam").Visible = True

Isso parece ser onde o erro ocorre na depuração.

Eu adicionei Kutoolsforexcel em Ferramentas/Referência


SubConvetYardsToMiles()
'
' Macro ConvetYardsToMiles
'

'
Colunas("I:I"). Selecione
Selection.Copy
Seleção.Inserir Shift:=xlToRight
Application.CutCopyMode = False
Selection.Copy
Seleção.Inserir Shift:=xlToRight
Colunas("J:J"). Selecione
Windows("KutoolsHelper.xlam").Visible = True
ActiveWindow.Visible = Falso
Colunas("K:K"). Selecione
Windows("KutoolsHelper.xlam").Visible = True
ActiveWindow.Visible = Falso
ActiveWindow.SmallScroll para a direita:=1
Faixa("L2"). Selecione
ActiveCell.FormulaR1C1 = "=IF(RC[-2]=""mi"",RC[-1],RC[-1]/1760)"
Faixa("L2"). Selecione
Selection.AutoFill Destination:=Range("L2:L832")
Faixa("L2:L832"). Selecione
Colunas("L:L"). Selecione
Selection.NumberFormat = "0.00 Milhas"
Colunas("L:L"). Selecione
Columns("L:L").EntireColumn.AutoFit
Selection.ColumnWidth = 14.91
Faixa("L1"). Selecione
ActiveCell.FormulaR1C1 = "Milhas percorridas"
Faixa("L2"). Selecione
ActiveWindow.SmallScroll para a direita:=-1
Colunas("H:K"). Selecione
Selection.EntireColumn.Hidden = Verdadeiro
ActiveWindow.SmallScroll para a direita:=-4
Colunas("L:L"). Selecione
Com Seleção
.HorizontalAlignment = xlGeral
.VerticalAlignment = xlCenter
.Orientação = 0
.AddIndent = Falso
.IndentLevel = 0
.ShrinkToFit = Falso
.ReadingOrder = xlContext
.MergeCells = Falso
Terminar com
Com Seleção
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.Orientação = 0
.AddIndent = Falso
.IndentLevel = 0
.ShrinkToFit = Falso
.ReadingOrder = xlContext
.MergeCells = Falso
Terminar com
Linhas("1:1").Selecione
Faixa("C1").Ativar
Selection.Font.Bold = Falso
Selection.Font.Bold = Verdadeiro
Com Seleção.Fonte
.Nome = "Arial"
. Tachado = Falso
.Sobrescrito = Falso
.Subscrito = Falso
.OutlineFont = Falso
.Sombra = Falso
.Underline = xlUnderlineStyleNone
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
Terminar com
Com Seleção.Fonte
.Nome = "Arial"
.Tamanho = 12
. Tachado = Falso
.Sobrescrito = Falso
.Subscrito = Falso
.OutlineFont = Falso
.Sombra = Falso
.Underline = xlUnderlineStyleNone
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
Terminar com
Com Seleção
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = Falso
.Orientação = 0
.AddIndent = Falso
.IndentLevel = 0
.ShrinkToFit = Falso
.ReadingOrder = xlContext
.MergeCells = Falso
Terminar com
End Sub
1 ano atrás
·
#3346
0
Votos
desfazer
TENHO O MESMO PROBLEMA COM ESTA LINHA DE CÓDIGO:

Windows("KutoolsHelper.xlam").Visible = True

É permitido chamar uma macro Kutools de outra macro gravada?
  • Página :
  • 1
Ainda não há respostas para esta postagem.