Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA go to line
Hi,
I have some code and a while loop. I want to go to the line where the text "L1" is in the code. "L1" is right before the while loop. and I want to go to the "L1" based on the result of an if statement. I was looking for a "Go to" function in my VBA manual, but I could not find anything. Is there a Go to function that can help me? Thanks for your help |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA go to line
Sub TryNow()
Dim Test As Boolean Dim This As Integer Dim That As Integer This = 1 That = 1 Test = MsgBox("Continue?", vbYesNo) = vbYes If Test = True Then GoTo L1 Exit Sub L1: While This = That MsgBox "I'm in the loop" This = InputBox("Give me a number: 1 to continue, other to stop") Wend MsgBox "I've stopped" End Sub HTH, Bernie MS Excel MVP "Jeff" wrote in message ... Hi, I have some code and a while loop. I want to go to the line where the text "L1" is in the code. "L1" is right before the while loop. and I want to go to the "L1" based on the result of an if statement. I was looking for a "Go to" function in my VBA manual, but I could not find anything. Is there a Go to function that can help me? Thanks for your help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Change line in Chart | Charts and Charting in Excel | |||
Label an average line in a dynamic chart | Charts and Charting in Excel | |||
coloring overy other line without doing so line by line | Excel Worksheet Functions | |||
Formatting lines between data points in a line chart | Charts and Charting in Excel | |||
Line chart - date line association gone mad! | Charts and Charting in Excel |