Note: The other languages of the website are Google-translated. Back to English
Support is Offline
Today is our off day. We are taking some rest and will come back stronger tomorrow
Official support hours
Monday To Friday
From 09:00 To 17:30
  Monday, 05 December 2022
  2 Replies
  497 Visits
-1
Votes
Undo
Hi, I am new to Macros, VBA and Kutools.

I am running a macro to extract text then numbers in separate cells. The Kutools works fine when i run it, however when i follow the same process to create a macro, I get an error message:

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

This appears to be where the error occurs in the debugging.

I have added Kutoolsforexcel in Tools/Reference


Sub ConvetYardsToMiles()
'
' ConvetYardsToMiles Macro
'

'
Columns("I:I").Select
Selection.Copy
Selection.Insert Shift:=xlToRight
Application.CutCopyMode = False
Selection.Copy
Selection.Insert Shift:=xlToRight
Columns("J:J").Select
Windows("KutoolsHelper.xlam").Visible = True
ActiveWindow.Visible = False
Columns("K:K").Select
Windows("KutoolsHelper.xlam").Visible = True
ActiveWindow.Visible = False
ActiveWindow.SmallScroll ToRight:=1
Range("L2").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-2]=""mi"",RC[-1],RC[-1]/1760)"
Range("L2").Select
Selection.AutoFill Destination:=Range("L2:L832")
Range("L2:L832").Select
Columns("L:L").Select
Selection.NumberFormat = "0.00 Miles"
Columns("L:L").Select
Columns("L:L").EntireColumn.AutoFit
Selection.ColumnWidth = 14.91
Range("L1").Select
ActiveCell.FormulaR1C1 = "Miles Driven"
Range("L2").Select
ActiveWindow.SmallScroll ToRight:=-1
Columns("H:K").Select
Selection.EntireColumn.Hidden = True
ActiveWindow.SmallScroll ToRight:=-4
Columns("L:L").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlCenter
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Rows("1:1").Select
Range("C1").Activate
Selection.Font.Bold = False
Selection.Font.Bold = True
With Selection.Font
.Name = "Arial"
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
With Selection.Font
.Name = "Arial"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
End Sub
2 weeks ago
·
#3346
0
Votes
Undo
I HAVE THE SAME ISSUE WITH THIS LINE OF CODE:

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

Is it allowed to Call a Kutools macro from another recorded macro?
  • Page :
  • 1
There are no replies made for this post yet.

Follow Us

Copyright © 2009 - www.extendoffice.com. | All rights reserved. Powered by ExtendOffice. | Sitemap
Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.
Protected by Sectigo SSL