The index does not belong to the selection
Solved
sabw
-
sabw -
sabw -
Hello,
Here is the macro
Sub Macro124RDMTPE()
Dim mavar As Long
Dim mavard As Long
Dim mavard1 As Long
mavar = Sheets("Variable macro").Range("B1").Value
mavard = Sheets("Variable macro").Range("B3").Value
mavard1 = Sheets("Variable macro").Range("B4").Value
Sheets("124 Feuil").Select
Columns("A:A").Select
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, 1), Array(5, 1), Array(10, 1), Array(16, 9), Array(17, 1), _
Array(24, 1), Array(32, 9), Array(69, 1), Array(75, 1), Array(81, 1), Array(87, 9), Array( _
101, 1), Array(107, 1), Array(113, 1), Array(119, 9), Array(133, 1), Array(139, 1), Array( _
145, 1), Array(151, 9), Array(220, 1), Array(226, 1), Array(232, 1), Array(238, 9), Array( _
453, 9)), TrailingMinusNumbers:=True
Range("1:9").Select
Selection.Delete Shift:=xlUp
Sheets("2017 124 W" & CStr(mavard) & " to " & CStr(mavard1)).Select
and I have in the last line the message 'the index does not belong to the selection', I don't know what that means other than it doesn't bug every time.
Can someone help me please?
Here is the macro
Sub Macro124RDMTPE()
Dim mavar As Long
Dim mavard As Long
Dim mavard1 As Long
mavar = Sheets("Variable macro").Range("B1").Value
mavard = Sheets("Variable macro").Range("B3").Value
mavard1 = Sheets("Variable macro").Range("B4").Value
Sheets("124 Feuil").Select
Columns("A:A").Select
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, 1), Array(5, 1), Array(10, 1), Array(16, 9), Array(17, 1), _
Array(24, 1), Array(32, 9), Array(69, 1), Array(75, 1), Array(81, 1), Array(87, 9), Array( _
101, 1), Array(107, 1), Array(113, 1), Array(119, 9), Array(133, 1), Array(139, 1), Array( _
145, 1), Array(151, 9), Array(220, 1), Array(226, 1), Array(232, 1), Array(238, 9), Array( _
453, 9)), TrailingMinusNumbers:=True
Range("1:9").Select
Selection.Delete Shift:=xlUp
Sheets("2017 124 W" & CStr(mavard) & " to " & CStr(mavard1)).Select
and I have in the last line the message 'the index does not belong to the selection', I don't know what that means other than it doesn't bug every time.
Can someone help me please?