![]() |
|
#2
|
|||
|
|||
|
The crashing was caused by exessive 'Exit For' in my code. I divided my script into separate blocks to lessen the amount of nestings - so now I have better overview of them!
Also I now open the every source file I read the data from in a separate instance, and close it after the data are read and processed. Like: Code:
...
Dim oInst As Object
...
For strSourceNameRow = 1 To NumberOfSourceFiles
strSourceFile = <full path for source file to be opened>
Set oInst = GetObject(strSourceFile)
...
GoTo ExitSourceNameRow
...
ExitSourceNameRow:
' Activate the converter file, and Close the source file
Workbooks(strSourceFileName).Activate
Workbooks(strSourceFileName).Close savechanges:=False
oInst.Close
Set oInst = Nothing
Workbooks(strThisFile).Activate
...
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can employer see private files opened in Office 365 | thosdmg | Office | 0 | 02-27-2023 01:13 AM |
list of Opened excel files
|
SDondeti | Word VBA | 10 | 05-10-2018 03:52 PM |
| vba opened word files lock up sometimes | littlepeaks | Word VBA | 1 | 01-28-2016 01:16 PM |
| XLM Files are not being opened in newer version of Microsoft Office 2013 | KetulShah | Excel | 0 | 03-18-2014 08:23 PM |
How to download prev. opened Gmail files.
|
libertyfelix | Outlook | 1 | 03-25-2012 09:10 PM |