Home > Software engineering >  For help how to memory form data
For help how to memory form data

Time:10-02

You genuflect is begged master, how to put the VBA before input data in the form, the next open input before the show? VBA for small white,

CodePudding user response:

Saved to disk, the next time you open the load, the method generally have the following kinds:
1. Written to the file (including text file, database, ini configuration file)
2. Write to the registry (actually this nature is also a file)

CodePudding user response:

Though not quite understand, or thank you,

CodePudding user response:

Which means there's no way to save for your program directly after the data all have no, only when you start storing data in a local (a file), the next program starts to read the content in the file, can display the data in the last time you just the way they are,

CodePudding user response:

Deactive write excel form, reopen after thisworkboo_open, wrote in the control, no?

CodePudding user response:

Get a hidden excel form, put the data in, next time directly read to go,

CodePudding user response:

Upstairs said finished I will post a code
Save
Open the app. The path & amp; "\ 1. Ini" FOR the OUTPUT AS the # 1 'save the current file directory 1. Ini
Print # 1, "hello!" 'the file content to hello! Can write variable
CLOSE # 1 'CLOSE the file
Read
Dim the data as string
Dim buffer as a string
Open the app. The path & amp; "\ 1. Ini" for input as # 1 'open the current job 1. Ini
The do while not eof (1) 'loop to the end-of-file
Line input # 1, buffer 'read line by line stored in the buffer, circulation is a line at a time until the file not, if how do such variable to hold the knowledge of the last line, if each line need the change the code stored in each row variable
Loop 'end of the cycle
Close # 1 'close the file

CodePudding user response:

If only individual data can use static variables

CodePudding user response:

"Get a hidden excel form, put the data in, direct reading next time went,"
Only this method is feasible,

To know the office document at any time will be moved to other computers - after all it is not a program - write to the registry,. TXT,. Ini.? False way you let others copy also said to the others: "man, don't forget to copy * * at the same time, otherwise can't use"?

Does anyone know in addition to this method, there are no other way to let the user data as the document is saved?

CodePudding user response:

Your request is estimated only by god,
Don't keep the trace of the last time you, next time you go to check?
To also have a way, you find a tall person, write trace to the program itself? (estimated also not line, VB program is running condition is read-only) or generate BAT, before the end of the VB to write data to the VB program? Estimated antivirus software bother you!!!
Your request to find god!!!!!!
  •  Tags:  
  • VBA
  • Related