I am trying to open two different workbooks for transferring data. The complete location of workbooks are in two cells of the current workbook. First workbook opens correctly but there is error in opening other workbook. It says:
run time error 1004. File can't be found.
However, if i use path of workbook directly in the code, then it works fine. Anybody please tell me what I am doing wrong.
Sub ProcessReport() Dim MainWb As Workbook Dim DestWb As Workbook ' Load source and destination files Set DestWb = Workbooks.Open(Range("E10").Value) Set MainWb = Workbooks.Open(Range("E6").Value) ' Code for manipulation End Sub
Excel runtime error 1004
questions in theRelated
list to the right before posting this question, right? Also, what are the source and destination filenames you're putting in the cells? – Ken White