Option Explicit
Sub TestMe()
Dim fs As FileSystemObject
Dim ts As TextStream
Set fs = New FileSystemObject
Set ts = fs.CreateTextFile("C:\tmp\file.txt", True)
ts.WriteLine "Header1, Header2"
ts.WriteLine "1," & CStr(DateTime.Now)
ts.Close
Set ts = Nothing
Set fs = Nothing
End Sub
Saturday, August 31, 2013
VBA: Using FileSystemObject to create a file
Sample code to create a file in VBA using FileSystemObject which is part of Microsoft Scripting Runtime. See this link on how to reference MSR.
Subscribe to:
Post Comments (Atom)
Zig basic Windows application using win32 API
Zig basic Windows application using win32 API Info : OS: Windows 10 IoT LTSC 2021 Zig: 0.15.2 Sample application using zigwin32, Window...
-
Installing MonoDevelop in OpenSUSE 12.2 from its repository was very easy. When running it for the first time though I got the message: Th...
-
Tried to update my Ubuntu host today and it did pickup that new version of VirtualBox is available (4.1.8). All other packages installed pro...
-
Install Winget on Windows 2022 or Windows 10 LTSC Install Pre-reqs Install Microsoft.UI.Xaml/2.8.6 Navigate to https://www.nuget.org/pa...
No comments:
Post a Comment