?
Solved

How could the VB process the text file created by matlab automatically?

Posted on 2003-03-03
6
Medium Priority
?
179 Views
Last Modified: 2010-05-01
i do the calculations by matlab and the results could be saved into text file
how could the vb detect the current changes of text file and load the file automically?
0
Comment
Question by:Fan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 1

Expert Comment

by:tampabay420
ID: 8057057
maybe you could use the last modified value, Windows will store the date the last time a file was modified... or you could try matching the File Size, if the file is larger than it was before then new content has been added... etc...

hope this helps
0
 
LVL 14

Expert Comment

by:aelatik
ID: 8057059
You could set up a timer and scan every (60 or whatever) seconds if the 'modification date' has changed or the file size. And if changed process the file..

It works for me ...

0
 
LVL 14

Expert Comment

by:aelatik
ID: 8057064
Wow look at the post time ;-)
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Accepted Solution

by:
aelatik earned 225 total points
ID: 8057116
Test it...

Place a timer and a textbox on your form and test it...

Dim FirstTime As Boolean
Private Sub Form_Load()
FirstTime = False
Timer1.Interval = 1000 '1 second
End Sub
Private Sub Text1_Change()
If FirstTime = True Then
MsgBox Text1
End If
End Sub
Private Sub Timer1_Timer()
    Text1 = FileDateTime("c:\test.txt")
    FirstTime = True
End Sub
0
 

Expert Comment

by:CleanupPing
ID: 8900857
Fan:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 9012143
Moderator, my recommended disposition is:

    Accept aelatik's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month13 days, 4 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question