Need Help Creating A Text File Of Copied Files
I have written a program that copies files from one machine (cpu1) to other machines (cpu2, cpu3, cpu4). I need to write a log on the local machine (cpu1) stating the machine name of the copied to (cpu2) and date as the title of the log. When you open the log it has the files that were copied.
Thanks
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Creating One Text File From Existing Files
Hi,
I really need help with this one! There are at least 2 or more batch files but with unknown names. Now, what I need to do is copy all the texts from each and every one of them and save them in one file.
Any help or suggestion would be very much appreciated.
Creating A Text File That Lists Files And Timestamps
I am copying files from one machine to others and I have a .txt file that I want to list the files that were copied. How would I do that?
Rem write
Open "c:update.txt " For Output As #1
Print #1, ????
Close #1
Is there a way to list every file is the folder that I am copying from and write that to the c:update.txt?
Thank You
VB Functions For Reporting Un-copied Files
Good afternoon everybody! I would like to ask any expert here that does VB has some functions like getFile(), getTrace() and getTraceAsString() in PHP for reporting the path of files which cause exception in the program. Your kind helps are very valuable to me and I must say thank you to all the experts here.
Encrypted Files Copied To Remote PC
Hi guys,
I have a central server that runs encryption to secure the file contents. On occasion, an authorised user may request the server copy archived files to his/her computer for local manipulation.
My VB program which receives the file copy request duly copies down to the user's computer the files requested, but they are still encrypted! (Therefore the user cannot open or delete or move them).
What are my options for ensuring the files are decrypted when they arrive on the user's computer? The encryption was applied on the central server - so the central server has to decrypt the files before delivery.
For some (wrong) reason, I thought that if encrypted files were copied to somewhere, they'd be decrypted. This is obviously not the case!
Note that the user's computer is running NTFS. Perhaps changing the user's file system to FAT32 would help? Is there a switch on the "copyfile" API to decrypt files on copy?
Help appreciated!
Mark
Text Copied To Another Form
Alrite this is my code ive worked out so far
Code:
Private Sub cmdstart_Click()
If frmdetails.txtlabel.Text = "" Then
frmoptions.txtname.Text = ""
Load frmoptions
frmoptions.Show vbModal
Else
Dim str As String
str = "To continue, you must choose a label!!!"
If MsgBox(str, vbInformation + vbOKOnly) = vbOK Then Exit Sub
End If
End Sub
Edit: added VB code tags
What i want is on the frmdetails screen when they type in a name in the label text box i want this transferred (copied) over to the text box in frmoptions. Thanks
Know When Copied Text Has Changed..
Ok, so , i'm using this code, which puts the copied text within a textbox..
Text1.Text = Clipboard.GetText()
Which is run under an endless timer. The problem is, i dont want it to keep writing the same thing over and over again. I want it only to change the text again when the actual contents of the Clipboard copied text has changed. I dont want to write .. If Ctrl+C is pushed then.. because there's alternatives to that, such as Cut, or just using the right click menu.
All i want to know how to do is know when the contents of the copied text (within any window) has changed..
Thanks!
How To Paste Copied Text In Textbox?
I would like to click on a command1_click button on a form and paste previously copied text from/in memory into a text1 textbox on the same form?
Thanks Much,
Robert
Placeing Copied Word Text In Variables
Hi
I am using the macros in word to try and copy and paste specific parts of a document into a fresh word document,
It is going ok but for a couple of things
firstly on every section (dont worry about selecting i have that covered)
i need to compare the subjects to see if they are part of the same section
i tried using various versions of the copy and paste commands
Code:
dim SubjectPresent as string
dim SubjectPrevious as string
blah
blah
blah
'This is where the document is searched etc etc
TestSubject = Selection.copy
'This doesnt work
TestSubjectPresent = Selection.PasteAndFormat(wdPasteDefault)
'this also doesnt work
If TestSubjectPresent <> TestSubjectPrevious Then
TestSubjectPrevious = TestSubjectPresent
End If
also i have tried using the filedialog function in word to use a dialog box, i can get the box to the screen using
Code:
Private Sub LoadDocument_Click()
Dim path As String
Dim dlgOpen As FileDialog
' Set dlgOpen = Application.FileDialog(msoFileDialogOpen)
Set dlgOpen = Application.FileDialog(msoFileDialogFilePicker)
With dlgOpen
.AllowMultiSelect = False
.Show
End With
End Sub
But as for actually selecting the document and to have it open/created
i havent figured it out
i cant use the normal common dialog since i dont have Visual Studio installed
if anyone could help that would be great
cheers
Vertical Text In PICTURE BOX Copied To PRINTER
I've managed to create a VERTICAL FONT and printed some text to a PICTURE BOX - it's in the PICTURE BOX vertically just like it should be.
Now I want to put that PICTURE box data onto my printer.
I tried:
VB Code:
Printer.PaintPicture picRotate.Picture, xxx, yyy
But I get "Invalid Picture" error.
I've put JPG files into PICTURE BOX controls and used the PaintPicture method to put signatures onto the printer.
Why doesn't this work?
Creating Text Files And Saving Text To Them.
This is the best I can find to create a textfile and save a string variable's contents to it. Logically it doesn't make sense to me since you would first need to "create" a file before "opening" it, so either I just don't get it, or this is wrong.
Either way, it's not working, and generates the error: Run-time error '52': Bad file name or number
What am I doing wrong?
CODE'Saves to Text File
Dim strUserText As String
strUserText = "This is a bunch of text to save in a textfile."
Open "c:ProgramLogsLog_" & Date$ & ".log" For Output As #1
Print #1, strUserText
Close #1
Creating Text Files
Is there anyway to check to see if there is already a text file in a certain destination and then if there isnt, create it?
I want to make a high score form for my game. I want the game to check to see if there is a certin file with the name, 1.txt, in (app.path)millionaire and if there isnt create it. How would I do that?
Creating Text Files Within An App
Hey guys, heres my question. Ive got a listbox (list1) which lists all files in a folder selected by a user. I was wondering how to go through the list and for each file, make a corrisponding text file using the same file name. My next question would it be possible to have a template text file so to say and have the app just change the numbers for size in the text file.
Thanks guys for all the help
Dave
Creating Text Files..
This is an easy question just can't remember how to do it. Anyway, all i need to know is how to create a text file in the same directory as the main project.
Thanks to anyone who can help me.
Creating Text Files
Well, I'm not quite that bad, I know how to create text files, but how can I have it check for the files existence? If it doesn't exist, I want it to create it, but if it does already exist I want it to append and not overwrite what's already in the file.
Creating Text Files
Is there a way for VB to create a text file? I know it can open one and write to it, but can it actually create one?
Creating Text Files
ok so this probabally really simple but i just cant remember
how do i make a text file and overwrite any other files of the same name??
Creating Text Files
Hey everyone...I want to create text files with the name based on a field in my other text file. How do I do this?
-----------------------------------------------------------------------------------------------------------------
While Not EOF(fnum)
Input #fnum, observer, thetime, dates, location, northing, easting, species
If observer = "Jim" Or observer = "Bob" Then
Fnum2 = FreeFile
Open "M:" & observer & ".txt" For Input As Fnum2
Write #Fnum2, observer
--------------------------------------------------------------------------------------------------------------------
Thanks
Excel: Copied Text That Converts To Multi-columns
I was wondering if there is something I can add to text to let Excel know that that the text goes in diffrent columns.
For example, i know if you have a multi-line Excel automatically puts the items in diffrent rows. However, I do not know how to do diffrent columns.
Bacially, I would like the ability to create a text document in notepad and copy to Excel. Mostly for testing, but I have some things it would be handy for. Thanks.
ReNaming A File I Just Copied
Hello, I am having a bit of a hard time finding out how to rename a file. I just got my application to copy a file to another location via file list box, now I want to rename the file it just copied to its new location. Can any one Help me, thank you very much.
The statement will probably go right after this line of code.
dim FileNameCopy as string
FileNameCopy = file1.path & "" & file1.FileName
ImportCopy = CopyFile(FileNameCopy, App.Path, True, True)
??Rename ?? app.path & "" & file1.FileName, db1.mdb ??
Rename Copied File
i have a module within access to which i use to copy a file from one directory to another as follows:
Option Compare Database
Sub dave()
FileCopy "C:Program FilesLTSPPLDataExportedWeeks.xls", "C:Program FilesLTSPPLArchiveExportedWeeks.xls "
FileCopy "C:Program FilesLTSPPLNavisionshipment lines.txt", "C:Program FilesLTSPPLArchiveShipment lines.txt"
End Sub
I am going to a schedule this vb module which backs these files up every day into an archive folder. Is it possible that i can include the date and time in the rename part of the code so the file doesnt overwrite itself and remain unique. Maybe a date function?
Help much appriciated, thanks dave
Dynamic Name For A Copied File...?
Hey Guys,
Hopefully a simple solution to this problem I would like to solve.
I want to have some code that copies a file from a directory (Which will always be the same), and save the file to a directory (In the code below, I've used 'My Documents' as an example), BUT, have the filename so it is something like:
dbBernardSmith - 23/02/2006.mdb
Instead of just having, dbBernardSmith.mdb
The code I have at the moment:
VB Code:
Private Sub Command1_Click() Dim objFSO As New FileSystemObject Dim objFile As File 'copy file Set objFile = objFSO.GetFile(App.Path & "dbBernardSmith.mdb") objFile.Copy "C:Documents and SettingsAndyMy DocumentsAndydbBernardSmith.mdb"End Sub
It's very simple code, so hopefully someone will be able to help me on this
Cheers,
Andy
How Can I Tell If A File Has Finished Being Copied
I have writen an app that monitors folder and prints any pdf that ends up in these folders to the specified printer. The only problem that I have run into is that if a file is being copied to the folder and I try to process it I get an error.
So how can I tell If the file is still in the process of being copyied.
Here is the code that I was currently trying with no avail.
Function IsOpen(sFile As String) As Boolean
Dim hResult As Long
Dim OF As OFSTRUCT
Dim fso As New FileSystemObject
Dim NumBytes As Long
Dim NumBytes1 As Long
Dim I As Long
Dim Y As Long
IsOpen = False
hResult = OpenFile(sFile, OF, OF_SHARE_EXCLUSIVE)
If hResult = 55 Then
IsOpen = True
Else
CloseHandle hResult
NumBytes = FileLen(sFile)
'I was trying to wait a few seconds
For I = 1 To 1000000
Y = I / 0.37777
Next I
NumBytes1 = FileLen(sFile)
'trying to see if the file size changed but it seems that the minute
'the file starts to copy it has the finished size
If NumBytes = NumBytes1 Then
IsOpen = False
Else
IsOpen = True
End If
End If
End Function
Thanks in advance for the help VBworld is GREAT!
slr
Creating Tab Delimited Text Files
I am trying to put information from a form I have created into a tab delimited text file format. Can anyone help me with this? I can write information to a text file but I can't seem to get it in tab delimited format. Help! This assignment is due Monday!
Creating Delimited Text Files
how do i create a c omma delimited text file from this file. could someone please give me some code using location as an example.
thanks
shann
LOCATION: NW27-1-1E
Owner: WRB
Driller: International Water Supply
Well Name: RM RHINELAND TH #2
Well Use: Test Well
Water Use:
Date Completed: Aug 09, 1971
WELL LOG
From To Log
(ft.) (ft.)
0 14.0 SILT, CLAYEY, LIGHT BROWN
14.0 23.0 CLAY, SILTY, GREY AND BROWN, OXIDIZED
23.0 42.0 CLAY, GREY, SOFT
42.0 145.9 CLAY, GREY, VERY SOFT
145.9 150.9 TILL, GREY, SOFT, GRITTY, COBBLES AND BOULDERS
150.9 157.9 TILL, GREY, GRITTY, HARD, BOULDERS
157.9 163.9 TILL, GREY, SOFTER THAN ABOVE, THIN GRAVEL LAYERS
163.9 164.9 GRAVEL
164.9 171.9 TILL, GREY, HARD, GRAVELLY LAYERS, BOULDERS
171.9 179.9 LIMESTONE GRAVEL AND LIMESTONE BOULDERS, CEMENTED,
LOST CIRCULATION AT 180 FEET
WELL CONSTRUCTION
From To Casing Inside Outside Slot Type Material
(ft.) (ft.) Type Dia.(in) Dia.(in) Size(in)
0 169.9 casing 2.00
169.9 179.9 perforations SL. PIPE
Top of Casing: ft. below ground
PUMPING TEST
Date:
Pumping Rate: 10.0 Imp. gallons/minute
Water level before pumping: ft. below ground
Pumping level at end of test: ft. below ground
Test duration: 1 hours, minutes
Water temperature: ?? degrees F
REMARKS
500 FT S + 80 FT E OF SEC LINE, FILE WRB RHINELAND, HOLE SEALED WITH
6 INCH BY 6 INCH PLUG AND CEMENT ON TOP OF IT, CHEMICAL ANALYSIS
(1971)
_____________________________________________________
Creating Delimited Text Files
I am very new at vb
can someone please give me some code on how to make the following file into a comma delimited file.
could you please use location as an example. i have to parse out the fields to use in access later.
time is of the essence
thanks very much
gus
LOCATION: SE9-1-1E
Owner: JAKE BEUCKERT
Driller: Paddock Drilling Ltd.
Well Name:
Well Use: Production
Water Use: Livestock
Date Completed: Sep 05, 1996
WELL LOG
From To Log
(ft.) (ft.)
0 5.0 CLAY, BLACK TOPSOIL
5.0 10.0 BROWN SILTY CLAY
10.0 15.0 BROWN SILTY SAND, SHELLS
15.0 18.0 VERY FINE BROWN SAND
18.0 25.0 SILTY SANDY GREY CLAY
25.0 30.0 PLASTIC GREY CLAY
WELL CONSTRUCTION
From To Casing Inside Outside Slot Type Material
(ft.) (ft.) Type Dia.(in) Dia.(in) Size(in)
0 9.0 CASING 30.00 CORRUGATED FIBERGLASS
9.0 29.0 PERFORATIONS 0.040 SAW CUT FIBERGLASS
0 29.0 GRAVEL PACK WASHED SAND
Top of Casing: 1.0 ft. above ground
PUMPING TEST
Date: Sep 05, 1996
Pumping Rate: 10.0 Imp. gallons/minute
Water level before pumping: 5.0 ft. below ground
Pumping level at end of test: 26.0 ft. below ground
Test duration: 1 hours, minutes
Water temperature: ?? degrees F
REMARKS
PUMP TEST IS RECOVERY
______________________________________________________________________
Verify That File Was Copied Correctly?
I'm going to be copying a file from one server to another the once I'm done I want to delete the original is there a way to verify that it was copied correctly? I'm sure that if you have something like check to see if an error happened during copy then pop something up.... but what error's should I be checking for? I'm sure I'm not the only one thats tried this ..any suggestions.
How Can I Change The File Attributes After Copied??
Hi, i have some query for the following.
After I use the following script to copy some text or excel files to other folder. How can i change the file attributes from read/write to read-only ???
Would any body can give me the script command to change the file attribute to read-only ?? Thank a lot .
Const OverWriteFiles = True
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFolder "T:OPSFILEICS*.*" , "C:ICS" , OverWriteFiles
Check File Copied Sucessfully
Does anyone know of a good way to check to see that a file has sucessfully been copied from one PC to antother. I cannot use the fileexists method of the file system object because the files may have already existed and just been overwritten. As well I have been trying to use the date modified time stamp to compare the two files but for some reason the date modifiend is sometimes off by 1 second and sometimes they are equal. So I cannot rely on something like the date modified to see if the file was copied successfully. If anyone could suggest any ways that have found around this it would be most helpful.
Thanks in advance.
Howto Confirm A Copied File
Hello there guys I know there is a certain way to check if a file has copied to a certain location. But how do I do this??
Help: Problem With Creating And Reading Text Files
This problem seems so annoying, because I don't know where I'm going wrong.
I'm making an app that simply creates and reads text files.
Code for my Application
Quote:
Private Sub Form_Load()
'check if file exists
If Dir$("c:pass.txt") <> "" Then
'it exists, so set it as password
strPassword = ReadFile("c:pass.txt")
Else
'if it doesn't, create it
Call WriteFile("c:pass.txt", "clickclick")
'load it to txtGetPass
strPassword = ReadFile("c:pass.txt")
End If
End Sub
Public Sub WriteFile(FileName As String, Contents As String)
Dim i As Integer
i = FreeFile
Open FileName For Output As #i
Print #i, Contents
Close #i
End Sub
Public Function ReadFile(FileName As String) As String
Dim i As Integer
i = FreeFile
On Error GoTo ErrorTrap
Open FileName For Input As #i
ReadFile = Input(LOF(i), i)
Close #i
Exit Function
ErrorTrap:
ReadFile = ""
End Function
This app check if the file FileName exists. If it doesn, great!, it sets it as strPassword. If it doesn't, it creates a file with FileName and Contents, loads it and sets it as password. Simple, right.
Well, here is the problem: Everytime I save "c:pass.txt", with the Content "clickclick", it saves it with a black line after the "clickclick". My text file therefore contains to lines. One with "clickclick", and the other with nothing.
So, when my program loads up "c:pass.txt", it manages to load it up, but it loads it up with the two spaces after, therefore chaning strPassword. This is what strPassword therefore looks like: clickclick -- and then a blank line.
Anyone got a solution to my problem. Any help will be much appreciated. Thank you very much.
Ankur
Getting File Size Of File Copied To Folder
Please help. I trying to monitor a file while it is being copied to a folder. I have found information on LOF and such but I get an access denied.
[vb]
Dim lFileLength As Long
Open "MyFile.txt" For Binary As 1
lFileLength = LOF(1)
Close 1
[vb]
I know I'll have to loop the process till the new Length = old Length but I need be able to get the new length.
Thanks for your help in advance.
ZeroEffect
Copied File - Change Date Modified?
im creating this prog (almost done), its called "playlist extractor", it copies the files from a mp3 playlist to a folder u tell it, but i want it to change the date modified of the file to the time when it was copied, so it can be sorted in explorer.
THANKS
Need To Lock A File - Prevent It From Being Copied, An Ideas??
hello i not sure if what i need can be done using Vb in word but maybe, you people here know some answers to some hard questions.
heres my situation: i need to be able to lock this files, book actually, and prevent them from being copied to another computer.
these books are downloaded from the internet, and i want the person to be able to print, but not copy it over to another person computer.
i was thinking of maybe adding some vb to a word document, but maybe a PDF with some locks on it??
im not sure, any ideas or sugestions, surely someone has done something simillar.
Creating Form To Export Data To 2 Text Files.
I have access to both VB 6.0 and VB .NET 2002 so help on either is appreciated.
If this is not the place for this question I understand, please just point me to where I should be going.
I do not have a heavy programming background however I have written a very useful VBScript to perform several functions. This script has two text files that it depends on for configuration (ie: a list of files it must remove).
In order to better faciliate the script I want to create a VB form that depending on which check boxes are selected it will populate the two text files required for the script. Additionally I would like the values that it will populate from to be stored in an access database table(s).
#1 How difficult is this going to be with someone of a decent amount of scripting experience but not too much app programming.
#2 Are there any samples out there that I can look at?
#3 Is there an easier way than what I have listed above?
Any help is greatly appreciated.
Thanks again,
Jim
Need Help Creating A .txt File Of Files In A Folder
I am copying files from one central location "C:Documents and SettingsAll UsersDesktopupdates" to the same location on multiple machines dependent on what was selected via option boxes "live and test".and I need to make a .txt file of the files that were copied with whatever text was entered in txtTo.text being the file name of the .txt file. Can anybody give me a hand, I am having a hard time with it.
Code:
Option Explicit
Private Declare Function CopyFile Lib "kernel32" _
Alias "CopyFileA" (ByVal lpExistingFileName As String, _
ByVal lpNewFileName As String, ByVal bFailIfExists As Long) _
As Long
Private Type SHFILEOPSTRUCT
hWnd As Long
wFunc As Long
pFrom As String
pTo As String
End Type
Dim txt As String
Dim txt1 As String
Dim txt2 As String
Dim txt3 As String
Private Declare Function SHFileOperation Lib "shell32.dll" Alias "SHFileOperationA" (lpFileOp As SHFILEOPSTRUCT) As Long
Private Const FO_COPY = &H2
Public Sub SHCopyFile(ByVal from_file As String, ByVal to_file As String)
Dim sh_op As SHFILEOPSTRUCT
With sh_op
.hWnd = 0
.wFunc = FO_COPY
.pFrom = "C:Documents and SettingsAll UsersDesktopupdates*.*"
.pTo = "\" & txtTo.Text & txt
txt3 = "C:Documents and SettingsAll UsersDesktopupdates*.*"
End With
SHFileOperation sh_op
End Sub
Private Sub cmdCopy_Click()
SHCopyFile txt3, txtTo.Text
End Sub
Private Sub Option1_Click()
txt = "LIVEUPDATES"
End Sub
Private Sub Option2_Click()
txt = "TESTUPDATES"
End Sub
Thanks for your help
Creating A File, And Loading Two Files At Once
How would i code the save buttons so it would create a file at the users difined area, and save a text file and a image file as the same name, so it stores the comment/description in a file for each image e.g. image1.jpg would have a file called image1.txt, and then your program just has to read this file when the image is loaded?
*See here for more info about my problem*
Creating And Copying Files Into A .Zip File
Hi,
I want to be able to create a blank zip file and copy a text file into that zip directory. I can create the zip file and I've been trying the FileCopy function without success.
Any help would be much appreciated.
Thanks,
Mike
Opening Multiple .asc Files & Creating One .txt File
I am new to Excel VBA and I need some help. I want to create a macro that opens an .asc file which user selects through an input box. I want the macro to then copy a certain range of data from the .asc file and export into a .txt file. After that is done I want it to open another .asc file, do the same thing, but export it to the same .txt file. To explain I have an Infrared machine that splits the large data output into two .asc files. One file has the beginging data, the other has the end data. I want the .txt file to contain the full range. The .asc files have added junk, that is why I only want to export a certain range. **NOTE** the first .asc file will have a different range to export than the second, but I know the exact range of each. When opening an .asc file Excel automatically brings up the "text to columns" box. I want the file to open fixed-width automatically. I probably confused everyone, sorry, but I know someone will have a solution. Thanks in advance....it is much appreciated.
Reading Files In A Folder And Creating .ini File
I dont know if this is possible using FileSystemObject and WritePrivateProfileString, but what I want to do is read ALL the files from a folder (that will contain music files) and place the file names in an .ini file.
For example :
Folder Contains Files : Song1.mp3, Another Song.mp3, Nice Song.mp3
.INI file created :
[Music]
Track1=Song1.mp3
Track2=Another Song.mp3
Track3=Nice Song.mp3
How To Replace Special Characters While Creating Xml File From Text File?
Hi,
In my vb project i am creating xml file from text file by using record set. In my text file if any special characters found like –, . (this is not dot, appearing in the middle of the line) ascii character of that . is 183, xml was not created. it is giving error
Invalid character found.
How can i replace that characters, these two are examples, actually how many are there i don't know.
How can i solve this problem? Any one please help me out.
Thanks in advance
Lalitha.C
Creating Text File
This should be a simple one for you. This is my first attempt at using a text file of any sort in my program. I wan the user to be able to export the values from my program, so that they can inport it to another program, or copy of the program. I am keeping all my information in an Access 2003 DB, which works fine, but when I go for the export, do I have to use specific code to create the text file, or does the open command automaticly create the file if it does not exist?
I am going to be using the Common dialog control to open/save the files.
Thanks for any help.
Creating A UTF-8 Text File.
I need to create and write strings to a UTF-8 file.
I tried using:
Code:
strMyString = strconv(strMyString, vbUnicode)
print #1, strMyString
Then, I tried creating the utf-8 file manually and then appending to it. But my accented characters still aren't coming out right.
(I'm using vb to process and rearrange the text so I can use it w/ another program.)
Next I tried using adodb:
Code:
Set objStream = CreateObject("ADODB.Stream")
objStream.Charset = "utf-8"
objStream.Open
objStream.Write strMyString
objStream.SaveToFile "C: est.dat"
objStream.Close
But that seems to have created an ANSI file.
Is it possible to do what I want?
Creating A Text File.
Is there a way to just create a plain text file with VB? I don't want the quotes and EOF mark that appear with sequential files or the markings you get with random access, just the plain text from a string, nothing else.
Creating A Text File
I have made a till program that prints a receipt to give to the customer, is there anyway that I can send this receipt to a textfile for the till operator to print and save later???
Creating A .CSV Text File
----------------------------------
1. How can I create a new .txt file in a given folder?
2. How can I insert/add data in it using the CSV format?
3. How can I read the data from the CSV file?
Thanks!
----------------------------------
Creating A Text File....??
Guys,
How would one do the following. I would like to create a text file that stores a bunch of variables when the form is saved. Then if the form is opened again, check for that file and if found, pre-populate the fields. This goes along with the cookie question I had before. Thanks for any thoguhts on this one.
Creating A Text File
I did a search in this forum, but none of them answered my question.
What I am looking for is, once the program runs, it will ask the user to type a text file name, and then it will use the Open "strNameFile" For Input #1
Do I require to create a string in the Sub Main, such as
Public strNameFile As String
Sub Main()
strNameFile = InputBox("Please enter name of text file", "Name required")
Form1.Show
End Sub
I don't know how to get the program to create a text file, but I thought I should use 'CreateTextFile' method? Any suggestions?
Many thanks!
|