' To load work book based on cell value
' Real Estate Books
Dim varCellvalueReal As String
'Filename:=Sheets("Sheet1").Range("A2").Value & "\" & Sheets("Sheet2").Range("A2").Value)
varCellvalueReal = Workbook(Filename:=Sheets("Sheet7").Range("D3").Value) ' & "\" & Sheets("Sheet2").Range("A2").Value)
' Personal Books
'Dim varCellvaluePer As String
varCellvaluePer = Range.Worksheet(7, ("D3"))
strFromDate = txtFromDate.Value
strToDate = txtToDate.Value
aFromDate = Split(strFromDate, "/")
aToDate = Split(strToDate, "/")
dtFromDate = DateSerial(aFromDate(2), aFromDate(0), aFromDate(1))
dtToDate = DateSerial(aToDate(2), aToDate(0), aToDate(1))
dtCheckDate = dtFromDate
Application.Interactive = False
Set oReportWorkbook = ActiveWorkbook
Set oReportWorksheet = ActiveSheet
' To Open WOrkbooks
Set oWorkbook1 = Workbooks.Open(varCellvaluePer)
Set oWorkbook2 = Workbooks.Open(varCellvalueReal)
Sheet7
' Real Estate Books
Dim varCellvalueReal As String
'Filename:=Sheets("Sheet1").Range("A2").Value & "\" & Sheets("Sheet2").Range("A2").Value)
varCellvalueReal = Workbook(Filename:=Sheets("Sheet7").Range("D3").Value) ' & "\" & Sheets("Sheet2").Range("A2").Value)
' Personal Books
'Dim varCellvaluePer As String
varCellvaluePer = Range.Worksheet(7, ("D3"))
strFromDate = txtFromDate.Value
strToDate = txtToDate.Value
aFromDate = Split(strFromDate, "/")
aToDate = Split(strToDate, "/")
dtFromDate = DateSerial(aFromDate(2), aFromDate(0), aFromDate(1))
dtToDate = DateSerial(aToDate(2), aToDate(0), aToDate(1))
dtCheckDate = dtFromDate
Application.Interactive = False
Set oReportWorkbook = ActiveWorkbook
Set oReportWorksheet = ActiveSheet
' To Open WOrkbooks
Set oWorkbook1 = Workbooks.Open(varCellvaluePer)
Set oWorkbook2 = Workbooks.Open(varCellvalueReal)
Sheet7
ECT - Report_V1_3-1-test.xlsm | |||||||||
---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | |||
1 | Location | File | Joined | ||||||
2 | Real | D:\Country&LocalReport\ | 2022 - ECT - Real Estate.xlsx | D:\Country&LocalReport\2022 - ECT - Real Estate.xlsx | |||||
3 | Personal | D:\Country&LocalReport\ | 2022 - ECT - C&L - Personal.xlsm | D:\Country&LocalReport\2022 - ECT - C&L - Personal.xlsm | |||||
4 | Rows | 7000 | |||||||
Report Location |
Cell Formulas | ||
---|---|---|
Range | Formula | |
D2:D3 | D2 | =CONCATENATE(B2,C2) |