月曜日、05 12月2022
  2 返信
  5.8K訪問
-1
投票
アンドゥ
こんにちは、私はマクロ、VBA、およびクツールを初めて使用します。

テキストを抽出してから別のセルに数値を抽出するマクロを実行しています。 Kutools を実行すると問題なく動作しますが、同じプロセスに従ってマクロを作成すると、エラー メッセージが表示されます。

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

これは、デバッグでエラーが発生した場所のようです。

ツール/リファレンスにKutoolsforexcelを追加しました


サブ ConvetYardsToMiles()
'
' ConvetYardsToMiles マクロ
'

'
Columns("I:I").Select
選択。コピー
Selection.Insert Shift:= xlToRight
Application.CutCopyMode = False
選択。コピー
Selection.Insert Shift:= xlToRight
列("J:J").選択
Windows("KutoolsHelper.xlam").Visible = True
ActiveWindow.Visible = False
列("K:K").選択
Windows("KutoolsHelper.xlam").Visible = True
ActiveWindow.Visible = False
ActiveWindow.SmallScrollToRight:=1
範囲("L2").選択
ActiveCell.FormulaR1C1 = "=IF(RC[-2]=""mi"",RC[-1],RC[-1]/1760)"
範囲("L2").選択
Selection.AutoFill Destination:=Range("L2:L832")
Range("L2:L832").Select
列("L:L").選択
Selection.NumberFormat = "0.00 マイル"
列("L:L").選択
Columns("L:L").EntireColumn.AutoFit
選択範囲.列幅 = 14.91
範囲("L1").選択
ActiveCell.FormulaR1C1 = "走行マイル数"
範囲("L2").選択
ActiveWindow.SmallScrollToRight:=-1
列("H:K").選択
Selection.EntireColumn.Hidden = True
ActiveWindow.SmallScrollToRight:=-4
列("L:L").選択
選択あり
.Horizo​​ntalAlignment = xlGeneral
.VerticalAlignment = xlCenter
.方向 = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
最後に
選択あり
.Horizo​​ntalAlignment = xlCenter
.VerticalAlignment = xlCenter
.方向 = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
最後に
Rows( "1:1")。Select
Range("C1").Activate
Selection.Font.Bold = False
Selection.Font.Bold = True
Selection.Fontを使用
.Name ="Arial"
.取り消し線 = False
.上付き文字 = False
.下付き文字 = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
最後に
Selection.Fontを使用
.Name ="Arial"
.サイズ = 12
.取り消し線 = False
.上付き文字 = False
.下付き文字 = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
最後に
選択あり
.Horizo​​ntalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = False
.方向 = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
最後に
End Subの
このコード行にも同じ問題があります:

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

記録された別のマクロから Kutools マクロを呼び出すことはできますか?
  • ページ:
  • 1
この投稿に対する返信はまだありません。