Home > Software engineering >  Great god please help!!!!!!
Great god please help!!!!!!

Time:11-13



As shown, enter 2003 to a (1) a (1) + 1 after judgment for a (9), the subscript + 2 after the output value of 1604 a (11), [thank milaoshu1020 after the guidance of the great god]

Question, how to cycle?
Continue to 1604 assigned to text1. Text, continue to run again until the end of the array,

CodePudding user response:

You are the main points of a circle, or automatic cycle until the end?

CodePudding user response:

Loop until end

CodePudding user response:

Write well, I do not know whether meet your requirements, the code is as follows:
 
Option Explicit

Private (a) As Long

Private Sub Command1_Click ()
Label1. Caption=""

Dim strTemp As String
StrTemp=Text1. Text

Do
Dim blnFound As Boolean
BlnFound=False

Dim As Integer I
For I=LBound (a) To UBound (a)
'if found in an array in Text1 input number;
If CStr (a) (I)=strTemp Then
Dim j As Integer
J=I + Val (Text2. Text) 'subscript plus 2

'if the array is displayed;
If j & lt; Then=UBound (a)
StrTemp=a (j)
BlnFound=True
The Debug. Print a (j)
End the If

'as long as find out cycle;
The Exit For
End the If
Next

Loop While blnFound

Label1. Caption strTemp=
End Sub

Private Sub Form_Load ()
'initialize data;
ReDim a (1 To 24)

A (1)=2003
A (2)=1803
A (3)=1603
A (4)=503
A (5)=203
A (6)=703
A (7)=403
A (8)=103

A (9)=2004
A (10)=1804
A (11)=1604
A (12)=504
A (13)=204
A (14)=704
A (15)=404
A (16)=104

A (17)=2005
A (18)=1805
A (19)=1605
A (20)=505
A (21)=205
A (22)=705
A (23)=405
A (24)=105
End Sub

Download address:
Link: https://pan.baidu.com/s/1esLJNB4EqJYbVvT8mnCltw
The extracted code: kjq5

Run the example:

CodePudding user response:

Correction and added + 1, the code is as follows:
 
Option Explicit

Private (a) As Long

Private Sub Command1_Click ()
Label1. Caption=""

Dim strTemp As String
StrTemp=Text1. Text

Do
Dim blnFound As Boolean
BlnFound=False

Dim As Integer I
For I=LBound (a) To UBound (a)
'if found in an array in Text1 input number;
If CStr (a) (I)=strTemp Then
Dim j As Integer
J=I + Val (Text2. Text) 'subscript plus 2

'if the array is displayed;
If j & lt; Then=UBound (a)
StrTemp=Val (a (j)) + 1
BlnFound=True
The Debug. Print a (j)
End the If

'as long as find out cycle;
The Exit For
End the If
Next

Loop While blnFound

Label1. Caption strTemp=
End Sub

Private Sub Form_Load ()
'initialize data;
ReDim a (1 To 24)

A (1)=2003
A (2)=1803
A (3)=1603
A (4)=503
A (5)=203
A (6)=703
A (7)=403
A (8)=103

A (9)=2004
A (10)=1804
A (11)=1604
A (12)=504
A (13)=204
A (14)=704
A (15)=404
A (16)=104

A (17)=2005
A (18)=1805
A (19)=1605
A (20)=505
A (21)=205
A (22)=705
A (23)=405
A (24)=105
End Sub

Download address:
Link: https://pan.baidu.com/s/1YhprKRgd9Kc-xISI38geLw
The extracted code: f8ln

Run the example:

CodePudding user response:

After the 2003 train number should be 1604, 2003 + 1=2004 after pushing two to 1604; Continue to 1604 assigned to text1. Text calculation, 1604 + 1=1605 after pushing two to 205. The results of operation should be 1604 and 205 two,

CodePudding user response:

If this can be achieved, then a (I) how to excel import, rather than I lose good beforehand, because I may have thousands of my side

CodePudding user response:

Link: https://pan.baidu.com/s/1gOhFTPMOMQp3x7jYvBr_zQ
The extracted code: xx3k

The inside of the need to import from the excel and trains

CodePudding user response:

The calculation process of trains is understandable, but in front of you don't use time?

CodePudding user response:

In addition, the form is very complicated, how to extract? What is extraction order? Please say in detail;

CodePudding user response:

Then I'll go into more detail about me this software function, this is a spreadsheet system of subway,
1, east road and forest stand for the terminal radar weeks for transfer station; Nanjing station, wins too west road station for transfer station, so you need to read these four standing time to calculate the work point,
2, all the odd number for the uplink, the even number for the downlink,
3, the time of the yellow is the need to read, the form has two time, before a for time to the station, after a time to leave the station, the two worse time for the car in the standing time,

CodePudding user response:

CodePudding user response:



The index to change to the number that is mentioned above,

CodePudding user response:

On the number and the destination code, site, time,/downward, change to the number of...
What is input the data? Who is the output?

Input data, and in what order to read from the table?
What is the mode of output data and display?
Calculation process is what? A good example?

CodePudding user response:


nullnullnull
  • Related