luke1438
11-11-2007, 10:58 AM
I have the following code:
Sub Macro_1()
Dim iCol As Long
With Worksheets("Sheet 2")
iCol = Application.Match(.Range("C7").Value, _
Worksheets("Sheet 3").Rows(6), 0)
Worksheets("Sheet 1").Range("B10:B100").Copy
Worksheets("Sheet 3").Cells(10, iCol).Select
Selection.PasteSpecial Paste:=xlPasteValues
End With
End Sub
Why will it work from "Sheet 3" and no other sheet? I have tried everything. What am I missing?
Thanks
Luke
Sub Macro_1()
Dim iCol As Long
With Worksheets("Sheet 2")
iCol = Application.Match(.Range("C7").Value, _
Worksheets("Sheet 3").Rows(6), 0)
Worksheets("Sheet 1").Range("B10:B100").Copy
Worksheets("Sheet 3").Cells(10, iCol).Select
Selection.PasteSpecial Paste:=xlPasteValues
End With
End Sub
Why will it work from "Sheet 3" and no other sheet? I have tried everything. What am I missing?
Thanks
Luke