I have workbook in which i have to copy a range in one workbook to a range variable in the active workbook. i am getting an error when i execute the following..Is there any other ways of doing this.
Dim NTwbk As Workbook Dim AppExcel As Excel.Application Dim NewRng As Range Dim res As Range Sub OpenWBK() Set AppExcel = New Excel.Application Set NTwbk = AppExcel.Workbooks.Open(Sheet1.Range("SecondWorkbookPath")) NewRng= NTwbk.Sheets("Sheet1").Range("B3") AppExcel.Quit End Sub I tried this also :
NewRng.Value = NTwbk.Sheets("Sheet1").Range("B3").Value Also didnt work