Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default Find the Length of a Text File

I always use this to find the length of a text file but isn't there a
better way?

While (EOF(1) < True)
Input #1, ' text
count = count + 1
Wend

Thanks,
-- Dan

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Find the Length of a Text File

Use the LOF command?

--
Regards,
Tom Ogilvy


"Dan R." wrote:

I always use this to find the length of a text file but isn't there a
better way?

While (EOF(1) < True)
Input #1, ' text
count = count + 1
Wend

Thanks,
-- Dan


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default Find the Length of a Text File

I always use this to find the length of a text file but isn't there a
better way?

While (EOF(1) < True)
Input #1, ' text
count = count + 1
Wend


Count = FileLen("<<path to your file")

Rick
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default Find the Length of a Text File

I think LOF returns the file size in bytes... but I could be wrong...

Thanks,
-- Dan

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default Find the Length of a Text File

That worked... thanks Rick.

-- Dan

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
Saving a worksheet as . prn text file - record length dochoa Excel Discussion (Misc queries) 1 October 11th 06 07:47 PM
Fixed length text file Eric Excel Discussion (Misc queries) 1 July 12th 06 10:02 PM
Find and Length Marc Excel Worksheet Functions 6 December 29th 05 03:59 PM
Find Folder Path + file Name Length and Insert into Spreadsheet Steve Roberts Excel Programming 1 July 26th 05 06:01 PM
find a text in a file name vlad Excel Programming 2 January 11th 05 06:51 PM


All times are GMT +1. The time now is 06:43 PM.

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

About Us

"It's about Microsoft Excel"