Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I got the following directly from the macro recorder, and it has worked
without fail for days. Suddenly, I am getting the error message "Compile Error: Wrong number of arguments or invalid property assignment" and it is highlighting the word "Range" between "Selection.TextToColumns Destination:= "and "("A1)." I am using the exact same information when running the procedure, and I can still run it in my back-up sheet. The only thing that has changed since last night is that I added a procedure that merged some cells at the end of my routine (well after Sub Delimit has run). I have deleted all merged cells from the sheet before running Sub Delimit again (by going to Special Cells Last Cell, selecting/deleting) so I don't think that's it. A1 is currently the last cell. I also commented out the procedure that merges the cells. If anyone can give me any ideas on where I went wrong and how to fix it, I would be _most_ appreciative. If the files won't delimit properly, my whole routine is toast. Thanks in advance, Patti Sub DelimitFile() ' delimit report On Error Resume Next Selection.TextToColumns Destination:=Range("A1"), DataType:=xlFixedWidth, _ FieldInfo:=Array(Array(0, 1), Array(16, 1), Array(30, 1), Array(54, 1), Array(57, 1), _ Array(71, 1), Array(83, 1), Array(94, 1), Array(100, 1), Array(106, 1), Array(112, 1), _ Array(118, 1), Array(124, 1), Array(130, 1), Array(136, 1), Array(142, 1), Array(148, 1)) On Error GoTo 0 End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Delimit using a formula 2 | Excel Discussion (Misc queries) | |||
delimit using a formula | Excel Discussion (Misc queries) | |||
Failing IF Statement | Excel Discussion (Misc queries) | |||
COUNTA failing? | Excel Discussion (Misc queries) | |||
Imported Data, How to delimit correctly | New Users to Excel |