Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Excel File name

  Asked By: Rani    Date: Sep 15    Category: MS Office    Views: 509
  

I am currently opening an excel file .. named as "MBB.xls"

I wanna to create a button, where with VBA coding..

once i click... it will came out as



"Path name/MBB.xls"

Basically i want to get the excel file name.. which file i am opening

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Robin Hayes     Answered On: Sep 15

Sub What_Am_I()

Dim CompletePathName As String
CompletePathName = ActiveWorkbook.Path & "\" & ActiveWorkbook.Name

MsgBox (CompletePathName)

End Sub

 
Didn't find what you were looking for? Find more on Excel File name Or get search suggestion and latest updates.




Tagged: