Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
filename and path as constant
easy...
can i define a filename and/or path as a constant? ex: Public JobNosDataFile As String JobNosDataFile = "Job Nos for Timesheets.xls" Public JobNosDataFilePath As String JobNosDataFilePath = "\\Server\Files\@ Timesheets\" can a refernece the name and path like this: If IsFileOpen("JobNosDataFilePath" & "JobNosDataFile") Then Workbooks("JobNosDataFile").Save Workbooks("JobNosDataFile").Close thanks in advance, mark |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
filename and path as constant
Mark,
You sure can! Public Const JobNosDataFile As String = "Job Nos for Timesheets.xls" Public Const JobNosDataFilePath As String = "\\Server\Files\@ Timesheets\" If IsFileOpen(JobNosDataFilePath & JobNosDataFile) Then Workbooks(JobNosDataFile).Save Workbooks(JobNosDataFile).Close End If Rob "mark kubicki" wrote in message ... easy... can i define a filename and/or path as a constant? ex: Public JobNosDataFile As String JobNosDataFile = "Job Nos for Timesheets.xls" Public JobNosDataFilePath As String JobNosDataFilePath = "\\Server\Files\@ Timesheets\" can a refernece the name and path like this: If IsFileOpen("JobNosDataFilePath" & "JobNosDataFile") Then Workbooks("JobNosDataFile").Save Workbooks("JobNosDataFile").Close thanks in advance, mark |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
http://CannotDeleteFile.net - Cannot Delete File? Try Long Path ToolFilename is too long? Computer Complaining Your Filename Is Too Long? TheLong Path Tool Can Help While most people can go about their businessblissfully unaware of the Windo | Excel Discussion (Misc queries) | |||
showing path and filename | Excel Worksheet Functions | |||
How do i display the Filename without the path? | Excel Discussion (Misc queries) | |||
Pulling in the path to a filename | Excel Worksheet Functions | |||
Footer - FileName and Path | Excel Discussion (Misc queries) |