LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Why is delimit failing me _now_???

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delimit using a formula 2 laandmc Excel Discussion (Misc queries) 3 March 5th 10 08:46 AM
delimit using a formula laandmc Excel Discussion (Misc queries) 2 March 4th 10 09:26 PM
Failing IF Statement Jemsilve Excel Discussion (Misc queries) 2 November 9th 07 09:23 PM
COUNTA failing? dpenny Excel Discussion (Misc queries) 4 July 24th 06 06:52 PM
Imported Data, How to delimit correctly GKS New Users to Excel 1 March 25th 06 06:32 PM


All times are GMT +1. The time now is 11:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"