LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
Gil Gil is offline
external usenet poster
 
Posts: 14
Default Open multiple HTML files in succession

This did it. Thanks to another site for a code snippet that didn't work but
provided the framework for this.

Dim intIndex As Integer
Dim fsSearch As FileSearch
Set fsSearch = Application.FileSearch
fsSearch.LookIn = "c:\mydirectory"
Application.ScreenUpdating = False
Application.DisplayAlerts = False
fsSearch.Filename = "*.htm"
fsSearch.Execute

For Each i In fsSearch.FoundFiles
Workbooks.OpenText Filename:=(i), _
Origin:=437, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True,
Semicolon:=False, _
Comma:=False, Space:=False, Other:=False, FieldInfo:=Array(1, 1), _
TrailingMinusNumbers:=True
'another sub formats the data
Application.Run "Extract.XLS!StripsAndPastesData"
Rows("1:1").Select
Selection.Copy
ActiveWorkbook.Close (False)
Windows("Extract.XLS").Activate
Sheets("Sheet1").Select
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Range("start").Select
ActiveWorkbook.Names.Add Name:="start",
RefersToR1C1:="=Sheet1!R[+1]C1"
Next i

Application.ScreenUpdating = True
Application.DisplayAlerts = True

End Sub


 
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
Combining multiple Excel files into one html? rjamison Excel Programming 0 June 14th 05 12:14 AM
Combining multiple Excel files into one html? rjamison Excel Programming 0 June 14th 05 12:14 AM
Combining multiple Excel files into one html? quartz[_2_] Excel Programming 9 April 21st 05 02:10 AM
How to open large HTML FILES IN EXCEL In quick Time Navin Excel Programming 1 January 16th 04 07:34 AM
How to open large HTML FILES IN EXCEL In quick Time Navin Excel Programming 0 January 13th 04 12:42 PM


All times are GMT +1. The time now is 05:08 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"