-
0 is replaced by 0, and the second one is elseif is not a light light and an else
-
**Too long, no closer look, just a few suggestions:
1. Delete or comment out on error resume next, and then run it to know what is wrong and what is wrong. In the design and debugging stage of the program, try not to use on error resume next, otherwise you won't know how to die! Even if you think that you are completely correct after debugging, I do not recommend using on error resume next, because the so-called "completely error-free **" is impossible to exist, and using on error resume next is equivalent to covering up the error, which is a negative programming attitude!
2. Timer is an internal function of vb, do not use it as a variable name, otherwise it will cause conflicts. Define the variable name, either with a single letter (i, j, k, etc.), or in the form of English words + numbers (such as timer1), so as to avoid conflicts with vb reserved words to the greatest extent. Try not to use a single common English word as a variable name!
3. dim b, c, timer, temp as string is wrong, only temp is string type, and the first three variables are variant type. While this isn't necessarily wrong, it's a very different idea than you were meant to be. The correct one should be:
dim b as string, c as string, timer1 as string, temp as string
4、c = & date\" str(b) +db"This is also obviously wrong, because the str function will automatically add a space in front of the positive integer (in fact, it is reserved for the positive sign), so that the final generated file name is wrong (for the file path, one more space and one less space are completely different file names, such as c:abc and c:abc are different).
The correct one should be: c = & date" b & db" 'Use & as a string connector, don't mix &+! And the str function is added here, vb will automatically convert b to a string.
Prima facie, it seems that there are still many mistakes in your **, as long as the first point above is dealt with, all problems will gradually emerge, and then they will be solved one by one. Again, don't use ON Error Resume Next! Otherwise, it is like adopting an attitude of avoiding and letting go of problems in life, and the problem will never be solved!!
-
You need to add a transfer of control command to the loop, I don't remember the specific command, you type vb transfer control in it.
Create a new project with two forms: form1, form2
There are two controls on form1: command button command1 and timer1There are two controls on form2: label label1 and timer1 click the command button when the program is running, the command button disappears, wait for 1 second and then pop up form 2 display: >>>More
The decimal part of the date variable with a value of less than 1 corresponds to the time of day from 0:00:00 to 24:00:00 >>>More
Chinese people have always had the custom of respecting their ancestors, and the names of their ancestors and elders cannot be called directly. This type of taboo is included in the ancestor worship customs of many ethnic groups such as Han, Oroqen, Evenki, Kazakh, Buyi, and Tibetan. The Oroqen people believe that calling their ancestors by their names is disrespectful to their ancestors, and they are afraid of angering their ancestors and causing disasters to their descendants. >>>More
Your first one is not a loop statement.
private sub form_click()if i = 0 then >>>More
mid(string a, start looking for the bit value (data b), find the number of digits (data c)) Your function looks like this. >>>More