Hello lads,
I have faced macro error on below code. Can you able to support on this. Enclosed pictures for you to review
Sub Weight_loop(Optional w As Worksheet)
Dim ws As Worksheet
Dim lRow As Long
Dim strSearch As String
'~~> Set this to the relevant worksheet
Set ws = ThisWorkbook.ActiveSheet
'~~> Search Text
strSearch = "Case Ref:"
Application.ScreenUpdating = False
With ws
'~~> Remove any filters
.AutoFilterMode = False
lRow = .Range("A" & .Rows.Count).End(xlUp).Row
With .Range("A10:A" & lRow)
.AutoFilter Field:=1, Criteria1:="=*" & strSearch & "*"
.Offset(1, 0).SpecialCells(xlCellTypeVisible).Select
End With
Call Packlist_Parts_Weights
'~~> Remove any filters
.AutoFilterMode = False
End With
Application.ScreenUpdating = True
End SubSub Packlist_Parts_Weights(Optional w As Worksheet)
'
' Last Updated - 27/10/2016 - BO
'
Dim Rng As Range
Application.ScreenUpdating = False
For Each Rng In Selection.Areas
Rng.TextToColumns Destination:=Rng.Resize(1, 1), DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, 2), Array(12, 2), Array(23, 2), Array( _
44, 1), Array(56, 1), Array(80, 1), Array(92, 1), Array(104, 1), Array(118, 1)), TrailingMinusNumbers:=True
Next Rng
Application.ScreenUpdating = True
End Sub
Bookmarks