Dim InvDate As String
Dim Ret As Variant
Ret is the result of an object that gets a file name.
Returned filename in Ret is: C:\Users\John Q. Public\Documents\CompanyDir\Name\LowVoltageProducts\Client\ComplianceMonitor\Cmdata\Inventory15-08-03.xlsx
The following formula gets the file date from the file name when using it in Excel. I want to save the date in a variable and copy name to another cell in a different worksheet.
Code crashes here:
InvDate.Formula = "= Right(Left(Ret, Find(""."", Ret, 20) - 1), 8)"
Error msg is "Invalid Qualifier" and InvDate is highlighted,