2 Replies - 496 Views - Last Post: 25 August 2017 - 04:54 PM Rate Topic: -----

#1 misaghah007  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 20-August 17

How to write data,save it in text file , then use the data

Posted 25 August 2017 - 12:27 AM

Hello there,

I was wondering, if I can write a data, then saved it to the text file.
And at the same time used that data to start my coding.

For example,

[
data(s, 3) = Val(txtStart.txt)
data(j, 4) = Val(txtEnd.txt)
T = data(s, 3)
E = data(j, 4) ]


I want to write the data txtStart and saved it in the column 3, txtEnd and saved it in data(j,4), and then used that data to start calculate . Wht at value should I put in the txt file ?
Is it possible?

Is This A Good Question/Topic? 0
  • +

Replies To: How to write data,save it in text file , then use the data

#2 andrewsw  Icon User is online

  • the case is sol-ved
  • member icon

Reputation: 6374
  • View blog
  • Posts: 25,755
  • Joined: 12-December 12

Re: How to write data,save it in text file , then use the data

Posted 25 August 2017 - 12:50 AM

Your question is confusing. Yes, you can write data.

You can store data in variables or a data structure, such as an array.
Yes, you can write the (array) values to a file. You might write to a .csv structure.
You can continue to work with the data in the data structure.
And you can later read values from the file back into a data structure.

I'm not sure what particular process is confusing you? Please clarify.
Was This Post Helpful? 0
  • +
  • -

#3 misaghah007  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 20-August 17

Re: How to write data,save it in text file , then use the data

Posted 25 August 2017 - 04:54 PM

View Postandrewsw, on 25 August 2017 - 12:50 AM, said:

Your question is confusing. Yes, you can write data.

You can store data in variables or a data structure, such as an array.
Yes, you can write the (array) values to a file. You might write to a .csv structure.
You can continue to work with the data in the data structure.
And you can later read values from the file back into a data structure.

I'm not sure what particular process is confusing you? Please clarify.


[ If (Ktotal <= K) And (Ctotal <= C) Then
For i = 0 To row - 1
If Tvisited(i) = 0 Then
s = 0

data(s, 3) = Val(txtStart.txt)
data(j, 4) = Val(txtEnd.txt)

T = data(s, 3)
E = data(j, 4)
Picture1.Print poi(s)
lunch = 0
dinner = 0
End If
Next i
]


I am sorry for confusing my statement.
its like this,I already have value of data(s,3) and data (j,4) in my text files,however, I want the user to key in new data in the next box,and start using that data for another process.
But then, data (s,3) are situated in column 3, while the data (j,4) located in column 4.

Can it be possible?

Thanks to whoever suggest anything.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1