![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Posts: 97
|
Any idea why this code doesn't work? Gives me an Invalid procedure call or argument runtime error... Am I missing a reference for my project?
Const ForReading = 1, ForWriting = 2, ForAppending = 3 Dim fs, f Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.OpenTextFile("c:testfile.log", ForAppending, True, TristateFalse) f.Write "Hello world!" f.Close |
|
|
|
|
|
#2 |
|
New Member
Join Date: Mar 2002
Posts: 32
|
I believe the value for appending should be 8.
Doug |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Posts: 97
|
Good call Doug, thanks a bunch
|
|
|
|
|
|
#4 |
|
Guest
Posts: n/a
|
I believe ForAppending should be 8 not 3.
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|