Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Problems with reading files

Hmm i wrote a makro that should search the newest .xls file in a directory
and open it. But it alway brings errors and no file gets opened. Can anyone
help me ?

Public ZMappe As String

Sub Auto_Open()

Dim Dat As Date
Dim DatVgl As Date
Dim Mappe As String

Const s = _
"F:\Siemens"
Mappe = Dir(s & "\*.xls")
Dat = FileDateTime(s & "\" & Mappe)

Do Until Mappe = ""
DatVgl = FileDateTime(s & "\" & Mappe)
If DatVgl Dat Then
Dat = DatVgl
ZMappe = s & "\" & Mappe
End If
Mappe = Dir()
Loop

Workbooks.Open Filename:=ZMappe



End Sub

Thanks alot in advance


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
Reading Multiple Files BadBoy Excel Worksheet Functions 5 January 15th 10 06:26 PM
Mircosoft Web Outlook having problems reading my mail Ms Vickie Excel Discussion (Misc queries) 0 November 25th 05 03:51 PM
Reading dbf files Luis Verme Excel Discussion (Misc queries) 6 July 1st 05 01:32 AM
reading data from text files in VBA Arne[_3_] Excel Programming 3 January 27th 04 10:07 AM
Reading all files in a folder H. Rye Excel Programming 1 January 20th 04 02:15 PM


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

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"