Hi,
Im working in the following Macros, in which I need to call a cell value from another closed workbook.
In this line Dim Csce As Worksheet: Set Csce = Workbooks("Batch 1.xlsm").Sheets("Sheet1")
Instead of "Batch 1.xlsm" I need to use a cell value from another closed workbook
Could anyone help on this?
Regards,
Vino
Im working in the following Macros, in which I need to call a cell value from another closed workbook.
VBA Code:
Sub Procheck()
Dim bFilename As String
bFilename = "C:\Localdata\ProCheck\" & Workbooks("Pro_Check.xlsm").Sheets("sheet1").Range("D8").Value & ".xlsm"
With GetObject(bFilename)
Dim Csce As Worksheet: Set Csce = Workbooks("Batch 1.xlsm").Sheets("Sheet1")
Dim lr As Long
lr = Csce.Range("F" & Csce.Rows.Count).End(xlUp).Row
Csce.Range("D10:F" & lr).Copy
In this line Dim Csce As Worksheet: Set Csce = Workbooks("Batch 1.xlsm").Sheets("Sheet1")
Instead of "Batch 1.xlsm" I need to use a cell value from another closed workbook
Could anyone help on this?
Regards,
Vino