![]() |
ThisWorkbook.FullName
Hi everyone. The below piece of code checks to see if the current open file
name is the same as a file name in a server folder. If LCase(file) < LCase(ThisWorkbook.FullName) Then If LCase(file) returns a server path like \\servera\folder\folder\folder LCase(ThisWorkbook.FullName) returns a path like G:\folder\folder\folder They are the same thing, but according to vb are different. How can I get LCase(ThisWorkbook.FullName) to return \\servera\folder\folder\folder?? |
ThisWorkbook.FullName
What you want is...
ThisWorkbook.Path HTH, Gary Brown "Steph" wrote: Hi everyone. The below piece of code checks to see if the current open file name is the same as a file name in a server folder. If LCase(file) < LCase(ThisWorkbook.FullName) Then If LCase(file) returns a server path like \\servera\folder\folder\folder LCase(ThisWorkbook.FullName) returns a path like G:\folder\folder\folder They are the same thing, but according to vb are different. How can I get LCase(ThisWorkbook.FullName) to return \\servera\folder\folder\folder?? |
ThisWorkbook.FullName
Hi Gary. This Workbook.Path gives me the same thing as Fullname, which is
the G:\ rather than the \\servera\ "Gary Brown" wrote in message ... What you want is... ThisWorkbook.Path HTH, Gary Brown "Steph" wrote: Hi everyone. The below piece of code checks to see if the current open file name is the same as a file name in a server folder. If LCase(file) < LCase(ThisWorkbook.FullName) Then If LCase(file) returns a server path like \\servera\folder\folder\folder LCase(ThisWorkbook.FullName) returns a path like G:\folder\folder\folder They are the same thing, but according to vb are different. How can I get LCase(ThisWorkbook.FullName) to return \\servera\folder\folder\folder?? |
ThisWorkbook.FullName
Here's a link to a couple of posts from Jim Rech and Tom Ogilvy about how to
convert the drive letter to the UNC path: http://groups.google.com/groups?thre...%40cppssbbsa06 Steph wrote: Hi everyone. The below piece of code checks to see if the current open file name is the same as a file name in a server folder. If LCase(file) < LCase(ThisWorkbook.FullName) Then If LCase(file) returns a server path like \\servera\folder\folder\folder LCase(ThisWorkbook.FullName) returns a path like G:\folder\folder\folder They are the same thing, but according to vb are different. How can I get LCase(ThisWorkbook.FullName) to return \\servera\folder\folder\folder?? -- Dave Peterson |
All times are GMT +1. The time now is 04:00 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com