I have been working on a macro
Code
Sub test1()
Dim myDir As String, fn As String, sn As String
myDir = "C:\Documents and Settings\user\Desktop\rachit miRNA analysis project\Data\"
fn = "2620_TotC_A3_SynC_A5_0003.xls"
sn = "2620_TotC_A3_SynC_A5_0003"
With Workbooks.Open(myDir & fn).Sheets(sn)
With .Range("a33", .Range("a" & Rows.Count).End(xlUp)).Resize(, 50)
ThisWorkbook.Sheets(1).Range("a1").Resize(.Rows.Count, .Columns.Count).Value = .Value
End With
.Close False
End With
End Sub
Display More
But it is showing error with ".Close False" line. When i remove this line the original file from which i am copying is not getting closed. What can i add in the macro to do it