A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
So I found that saving the Excel file to One Drive is what causes this error so I just saved it locally on my PC.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I am doing an assignment for school that requires me to display the last modified date on an excel file. Honestly, this is the first time I am using VBA with Excel and don't know much. Below is the code my teacher provided me and it seems right according to all the forums online.
Public Function ModDate()
Application.Volatile
ModDate = Format(FileDateTime(ThisWorkbook.FullName), "m/d/yy h:n ampm")
End Function
Every time I try to run the code within the VBA window it returns the error: Invalid procedure call or argument and points to the third line of code. Has anyone experienced this issue and is there a fix to this?
Thank you,
Sarah Tse
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
So I found that saving the Excel file to One Drive is what causes this error so I just saved it locally on my PC.