Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
I'm having a very wierd error with my MS Excel VBA coding. I have a macro that gets caught on the line Open "C:\{filename}" for Append as #2 It throws the error, "file not found" during runtime. I'm confused for 2 reasons: 1: Append should create the file if it wasn't found, shouldn't it? and 2: this exact same macro works on other machines that as far as i can tell are identical. Both are running the same Excel version (2002 SP3), both XP Pro, and same antivirus (Kaspersky) as well. I've been trying for a couple days on and off to try to figure out the problem, and have come up with nada. I found a previous post that sounds similar he http://groups.google.com/group/micro...0e3b8399774704 Does anyone know of a glitch in VBA that makes the Open command work sometimes and not others? or is there some windows setting that affects it's ability to create a file? it just doesn't make any sense to me! Help! Thanks to any and all, -Michael |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I found the problem. I turned out to be AntiVirus Software related -
which is why it worked on some machines but not others. The AV software we're using is Kaspersky (which is also what the other user was using in the thread linked to in my original post). I'd tested out the AV by disabling it, but that didn't fix it. However, for some reason, when I change the Real-Time settings for Kaspersky to High-Speed, the Macro should work correctly. easy, and so annoying fix. After the setting change, I was also able to keep kaspersky enabled while running the excel macro. Open for Append works fine now in creating and deleting the files. -Michael |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using Excel VBA: sending output data table to created .csv file +append Options | Excel Discussion (Misc queries) | |||
How to use Open as Append for log file | Excel Programming | |||
Open a print output sent to file | Excel Discussion (Misc queries) | |||
Open CSV file, format data and write output to a text file. | Excel Programming | |||
Cannot open file for output | Excel Programming |