Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

What is the Pathname Variable?

Status
Not open for further replies.

Rougy

Programmer
Oct 15, 2001
249
0
0
US
Hi,

I'm writing a macro that will include the pathname with the filename, but I forgot what the pathname variable is.

Date = &D

Path = ??

Filename = &F

I used to know what it was, but can't find it now in Excell Help.

Thanks.

-----
The death of dogma is the birth of reason.
 
This seems to be working:

dim vFileName as string

vFileName = ActiveWorkbook.FullName

-----
The death of dogma is the birth of reason.
 
PathName is not a variable. It is a property of the workbooks object collection and it is used to return the path anf file name of the workbook in question. for example:

sub mcrTest
Dim strPath as string

strPath = activeworkbook.pathname

msgbox strPath

end sub

Jamie 'DeVry'
 
... use PathName to return the directory location of the workbook, use the name property to return the name of the workbook, use the FullName property to return the path and name of the workbook.

Jamie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top