I'm having a really hard time opening a workbook in VBA.
This line of code gives me a type mismatch. path
is a String
and I am 100% sure it is valid and I am able to do the .SaveAs
with path
without issues.
' Compile Error: Invalid qualifier on Workbooks
Set wbNew = Workbooks(path).Open
I have tried other permutations like this one, but I get Compile Error: Invalid qualifier
on the Workbooks
object itself. Am I missing a reference?
' Compile Error: Invalid qualifier on Workbooks
Workbooks.Open path
How do I open a workbook in VBA?