Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting the file name in a cell 1

Status
Not open for further replies.

GRoStruc

Marine/Ocean
Oct 11, 2006
23
Hi,

Probably a stupid question but...

Is there a command for inserting the file name into a cell within a workbook, in the same vein as inserting it into the header, &[FILE]?

Thanks,

GRo
 
Replies continue below

Recommended for you

Simple macro should do it:
Code:
Private Sub Workbook_Open()
Cells(1, 1) = ActiveWorkbook.Path & "\" & ActiveWorkbook.Name
End Sub

Good Luck
johnwm
________________________________________________________
To get the best from these forums read faq731-376 before posting
Steam Engine enthusiasts
Steam Engine Prints
 
=CELL("filename",A1)

Cheers,
Joerd

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor