Re: Comparing ONLY the First Line of 2 Text Files
Yep, try this ...
VB Code:
Dim File1Data, File2Data As String
Open "c:\updates_vbc.txt" For Input As 1
Open "c:\updates_vbc2.txt" For Input As 2
Line Input #1, File1Data
Line Input #2, File2Data
If File1Data <> File2Data Then MsgBox "Dese ain't da same, bub!"
Close 2, 1
Re: Comparing ONLY the First Line of 2 Text Files
awesome!!! that is 100% exactly what i needed.
now another question...
what is the VB code for launching a external EXE and then exiting the current application
Re: Launching An External EXE File
Try using the SHELL operation
Examples:
For a normal focus use:
VB Code:
shell "C:\Windows\Notepad.exe",vbNormalFocus
For a maximised focus use:
VB Code:
shell "C:\Windows\Notepad.exe",vbMaximizedFocus
You can also use a program to open a file like this:
VB Code:
shell "C:\Windows\Notepad.exe c:\updates_vbc2.txt",vbMaximizedFocus
After you shell it just type "End" after the shell line
Hope this helps :D
Re: Launching An External EXE File
New Question!
i want to have 1 text file, and that text file will have like:
amy
bob
joe
suzie
and i want each line to be put into a variable. like we did before, but not JUST for the first line.
but... because i won't know in advance how many lines there will be (long story)... i need VB to continue puttin lines into variables until it gets to the end. OR it just counts how many lines their are or something.