Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 312
Default ThisWorkbook.FullName - A different approach

Maybe I can do something a little different -

LCase(ThisWorkbook.FullName) returns a full path. I can change the Fullname
to simply Name.
But then LCase(file) still returns a full path. How can I change
LCase(file) to return the file name only without the path?

Dim i As Long
Dim file As Object
Dim Files As Object

FileCountOK = True
Set Files = pzFolder.Files
For Each file In Files
If LCase(file) < LCase(ThisWorkbook.FullName) Then


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default ThisWorkbook.FullName - A different approach

Hi Steph,

try to use the dir command and you get only the filename. Then, compare
those results!

if ( dir (file) < dir (thisworkbook.fullname)) then
....
end if

Jos

"Steph" schreef in bericht
...
Maybe I can do something a little different -

LCase(ThisWorkbook.FullName) returns a full path. I can change the
Fullname
to simply Name.
But then LCase(file) still returns a full path. How can I change
LCase(file) to return the file name only without the path?

Dim i As Long
Dim file As Object
Dim Files As Object

FileCountOK = True
Set Files = pzFolder.Files
For Each file In Files
If LCase(file) < LCase(ThisWorkbook.FullName) Then




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default ThisWorkbook.FullName - A different approach

If LCase(file.Name) < LCase(ThisWorkbook.Name) Then

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Steph" wrote in message
...
Maybe I can do something a little different -

LCase(ThisWorkbook.FullName) returns a full path. I can change the

Fullname
to simply Name.
But then LCase(file) still returns a full path. How can I change
LCase(file) to return the file name only without the path?

Dim i As Long
Dim file As Object
Dim Files As Object

FileCountOK = True
Set Files = pzFolder.Files
For Each file In Files
If LCase(file) < LCase(ThisWorkbook.FullName) Then




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert ThisWorkBook.FullName as Link in Email jlclyde Excel Discussion (Misc queries) 3 February 4th 09 02:08 AM
ThisWorkbook.FullName Steph[_3_] Excel Programming 3 November 23rd 04 08:41 PM
Excel 2000 VBA ActiveWorkbook.FullName Dave Stanwick Excel Programming 2 December 12th 03 03:16 PM
Split fullname into Drive, Path and Filename Michael Göhring Excel Programming 2 December 12th 03 12:56 PM
Looking for Excel function to resolve userid to fullname. steve Excel Programming 0 September 17th 03 07:37 PM


All times are GMT +1. The time now is 10:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"