Do Until Loop In Excel VBA (In Easy Steps)
Có thể bạn quan tâm
Although not used very often on this site, you might find yourself in a situation where you want to use the Do Until Loop in Excel VBA. Code placed between Do Until and Loop will be repeated until the part after Do Until is true.
Place a command button on your worksheet and add the following code lines:
Dim i As Integer i = 1 Do Until i > 6 Cells(i, 1).Value = 20 i = i + 1 LoopResult when you click the command button on the sheet:

Explanation: until i is higher than 6, Excel VBA places the value 20 into the cell at the intersection of row i and column 1 and increments i by 1. As a result, the value 20 will be placed into column A six times (not seven because Excel VBA stops when i equals 7).
Từ khóa » Visual Basic Do Until
-
Do...Loop Statement - Visual Basic - Microsoft Docs
-
Vòng Lặp Do-Until Trong VBA - VietTuts
-
VBA - Do-Until Loops - Tutorialspoint
-
Thực Hành Với Visual Basic: Cấu Trúc Lặp Do ... Loop While
-
While Loop, Do While Loop, Do Until Loop, While End While - VB.NET
-
Hướng Dẫn Cách Viết Vòng Lặp Do Loop Trong VBA - Học Excel Online
-
Visual Basic Do ... Loops
-
Visual Basic Tutorial - 30 - Do Until Loop - YouTube
-
VB.NET Do Until Loops - Dot Net Perls
-
Visual Basic (VB) Do While Loop - Tutlane
-
Visual Basic Do Loops | The Coding Guys
-
Guide: Do Until Loops In VBA - Software Solutions Online
-
Do Until Loop Excel VBA
-
Loops (Repetition Structures) In Visual Basic 6