Tuesday, December 16, 2008

Microsoft Excel - VBA Function Get Active File Name

'just paste this into a VBA module
'johnson.1965@gmail.com
'14-dec-08

Function GetNameOfFile() as string

Dim wb as Workbook
set wb = Application.ActiveWorkbook

GetNameOfFile = wb.FullName
End Function

No comments: