View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Leith Ross[_78_] Leith Ross[_78_] is offline
external usenet poster
 
Posts: 1
Default Err 1004 when move Workbooks.OpenText to called Sub


Hello Sue,

The problem is with passing the array. In your Sub you're passing it a
a String. The Array must be a Variant. I have highlighted the problem i
red.

Sub texToWB(Wb As String, Textfile As String, Arr As String, GrpId A
String)

Change it to read...
Sub texToWB(Wb As String, Textfile As String, Arr As Variant, GrpId A
String

--
Leith Ros

-----------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846
View this thread: http://www.excelforum.com/showthread.php?threadid=47820