hellfire45
Active Member
- Joined
- Jun 7, 2014
- Messages
- 464
So I have this code below. It is opening a text file and pasting its contents into excel. Simple.
This particular workbook loops through around 1000 text files and compiles them into a single sheet. The problem is that the code has been stopping at the code below when it opens the file. It'll just sit there on the downloading screen. This only happens about every 20th file but its a big issue. Any idea why this is happening? It's essentially the little box with the bar that opens when the computer is opening up a file. Thanks so much!
Anyway to stop this from happening? I already have application.displayalerts = false at the start of the automations first module.
This particular workbook loops through around 1000 text files and compiles them into a single sheet. The problem is that the code has been stopping at the code below when it opens the file. It'll just sit there on the downloading screen. This only happens about every 20th file but its a big issue. Any idea why this is happening? It's essentially the little box with the bar that opens when the computer is opening up a file. Thanks so much!
Anyway to stop this from happening? I already have application.displayalerts = false at the start of the automations first module.
Code:
ChDir strFolderWorkbooks.OpenText FileName:=strFolder & filename_lessext & target_ext _
, 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