excel vba extract file name

The solution for “excel vba extract file name” can be found here. The following code will assist you in solving the problem.

Dim path As String
path = “C:\Temp\data\myfile.txt”
Debug.Print Mid$(path, InStrRev(path, “\”) + 1) ‘ -> myfile.txt

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

Similar Posts