Need help
I'm getting an error 1004 on this array loop below. The loop has worked in another application. Not sure why it doesn't work here.
Dim FromRng, ToRng
Dim i As Integer
Dim NewQuoteFile As String
Dim NewQuotePage As String
NewQuoteFile = Range("BF21")
NewQuotePage = Range("BF20")
FromRng = Array("BI22", "BI23", "BI24", "BI25", "BI26", "BI27", "BI28", "BI29", "BI31")
ToRng = Array("B12", "B15", "B16", "B17", "B18", "C20", "F21", "B23", "C45")
For i = LBound(FromRng) To UBound(FromRng)
Workbooks("2009 Quote Form.xlsm").Sheets("Module Number Entry").Range(FromRng(i)).Copy Destination:=Workbooks(NewQuoteFile).Sheets("Intro Letter").Range(ToRng(i))
Next i
I'm getting an error 1004 on this array loop below. The loop has worked in another application. Not sure why it doesn't work here.
Dim FromRng, ToRng
Dim i As Integer
Dim NewQuoteFile As String
Dim NewQuotePage As String
NewQuoteFile = Range("BF21")
NewQuotePage = Range("BF20")
FromRng = Array("BI22", "BI23", "BI24", "BI25", "BI26", "BI27", "BI28", "BI29", "BI31")
ToRng = Array("B12", "B15", "B16", "B17", "B18", "C20", "F21", "B23", "C45")
For i = LBound(FromRng) To UBound(FromRng)
Workbooks("2009 Quote Form.xlsm").Sheets("Module Number Entry").Range(FromRng(i)).Copy Destination:=Workbooks(NewQuoteFile).Sheets("Intro Letter").Range(ToRng(i))
Next i