How to use Goto in Excel VBA. Jumping lines of code - Code Included
Автор: EverydayVBA
Загружено: 2016-07-04
Просмотров: 20339
Grab the Free VBA Quick Reference Guide
https://www.chrisjterrell.com/excel-v...
The Goto Method allows you to jump around in your code or GoTo somewhere else. You can go down or up using the goto statement and code is provided that does just this
Code
================
Sub GotoMod()
TryAgain:
ibox = InputBox("Enter a Number between 1 and 10")
If ibox _ 1 Or ibox _ 10 Then
GoTo Numerr
End If
'Stop
Exit Sub
Numerr:
MsgBox "Something went wrong. Try again"
GoTo TryAgain
End Sub
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: