From: Jess on 28 Jan 2010 15:10 How can I get in excel the file name and the full path to the file? Is there a VBA command that retrieves this info? Thanks
From: Mike H on 28 Jan 2010 15:13 Hi mypath = ThisWorkbook.FullName -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "Jess" wrote: > How can I get in excel the file name and the full path to the file? Is there > a VBA command that retrieves this info? > > Thanks > > >
From: Jess on 28 Jan 2010 15:14 How can I also create a footer whose content is the full path followed by the file name? Thanks
From: Dave Peterson on 28 Jan 2010 15:18 Dim wkbk as workbook set wkbk = activeworkbook 'thisworkbook or workbooks("book1.xls") msgbox wkbk.name msgbox wkbk.Fullname msgbox wkbk.Path If you're creating a new workbook in your code and you want to test to see if it's been saved: if wkbk.path = "" then 'not saved else 'saved end if Jess wrote: > > How can I get in excel the file name and the full path to the file? Is there > a VBA command that retrieves this info? > > Thanks -- Dave Peterson
From: Gord Dibben on 28 Jan 2010 15:28 Delete what you don't want. Sub PathInFooter() ActiveSheet.PageSetup.RightFooter = ActiveWorkbook.FullName & " " & _ ActiveSheet.Name & " " & Application.UserName & " " & Date End Sub Gord Dibben MS Excel MVP On Thu, 28 Jan 2010 12:14:01 -0800, Jess <Jess(a)discussions.microsoft.com> wrote: >How can I also create a footer whose content is the full path followed by the >file name? > >Thanks
|
Next
|
Last
Pages: 1 2 Prev: Counting Selected/Highlighted Rows Next: Loading PivotCache directly from a text file |