Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How can I also create a footer whose content is the full path followed by the
file name? Thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 wrote: How can I also create a footer whose content is the full path followed by the file name? Thanks |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Choose Insert Footer and put this in the Left, Center, or Right Footer
&[Path]&[File]&[File] Hope this helps! If so, let me know, click "YES" below. -- Cheers, Ryan "Jess" wrote: How can I also create a footer whose content is the full path followed by the file name? Thanks |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Correction:
&[Path]&[File] -- Cheers, Ryan "Jess" wrote: How can I also create a footer whose content is the full path followed by the file name? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
file names with full path | Excel Programming | |||
Keep full file path in cell reference | Excel Discussion (Misc queries) | |||
Is it possible to get full file path in titlebar? | Excel Programming | |||
full path of excel file | Excel Discussion (Misc queries) | |||
Getting the full path when from a File Open Dialog Box | Excel Programming |