Displaying multiple values in a message box

  • Thread starter Thread starter Dani
  • Start date Start date
D

Dani

Is there a way to

startcheck = MsgBox(startvalue, vbOKOnly, "The cycles will be processed

with the following start time:")
endcheck = MsgBox(endvalue, vbokkonly, "The cycles will be
processed until the following end time:")
DurationCheck = MsgBox(duration, vbYesNo, "Would you like to
continue processing the cycles with the following duration in hours?")
Select Case DurationCheck
Case vbYes
'do nothing
Case vbNo
'exit macro
Exit Sub
End Select
 
Maybe...

Option Explicit
Sub aa()

Dim StartValue As Long
Dim EndValue As Long
Dim StartCheck As Long

StartValue = 12
EndValue = StartValue + 5

StartCheck = MsgBox(Prompt:="Start: " & StartValue & vbLf & _
"Finish: " & EndValue & vbLf & vbLf & _
"Continue?", Buttons:=vbYesNo)

If StartCheck = vbNo Then
Exit Sub
End If

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top