chirayu
Well-Known Member
Hi All,
For some reason my code is not working on each sheet in the workbook.
It throws up a popup box saying do I want to replace contents & then only works on the activesheet and ends.
For some reason my code is not working on each sheet in the workbook.
It throws up a popup box saying do I want to replace contents & then only works on the activesheet and ends.
Code:
Sub Macro1()
If ActiveSheet.Name = "Home" Then
End
Else
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
With ws
Columns("A:A").Select
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, 1), Array(35, 1), Array(48, 1)), TrailingMinusNumbers _
:=True
Range("A1").Select
End With
Next ws
End If
End Sub