Hello Experts,
I have a VLOOKUP Command that works - when executed in Isolation such as
=VLOOKUP("BALANCE",'\\Network-One\Collections\Summary\[SUMMARY_20190826.xlsx]Report'!$A$4:$H$40,8,FALSE) - This piece of Code works
I make the date as a Variable (say within a Sub Routine / Function) - by doing the following:
Date1 = Format(Now() - 1, "YYYYMMDD")
sPath = "\\Network-One\Collections\Summary\"
sFile = "SUMMARY_" & Date1 & ".xlsx"
sheetname1 = "Report"
Misc1 = "VLOOKUP("
Concatenate all of the above (to arrive at a VLOOKUP Statement - similar to the one that ran successfully (as posted in line 3 of this request above)
Misc2 = Misc1 & lookup1 & "," & "'" & sPath & "[" & sFile & "]" & sheetname1 & "'!" & Range1 & ",8, False)"
MsgBox ExecuteExcel4Macro(Misc2)
I KNOW - I am doing something wrong - is it perhaps using VLOOKUP incorrectly (or perhaps "ExecuteExcel4Macro" ?)
Your assistance is greatly appreciated.
Thank you
Bookmarks