Home |
Search |
Today's Posts |
#1
|
|||
|
|||
MsgBox OKCancel
I tried to make a message box which pops u when I hit a button. The question
should be "are you sure?" when OK then it continues to the "Sub Get_Inkoopdelen_Data()" when Cancel it has to return to the sheet "Index". I tried: Sub Bevesiging_ARF_Vullen() Dim i As Long Dim rng As Range Dim intButton As Integer intButton = MsgBox("Is het bron bestand geopend?" & vbNewLine "Klick "OK" om te vervolgen. Klick "Cancel" om terug te keren.", vbOKCancel + vbInformation, "Kosten Database Vullen") If intButton = vbCancel Then Exit Sub If intButton = vbOK Then Sheets("Index").Select End If Next i End Sub MY QUESTION: "What code should I use to "get a message box which pops u when I hit the "Fill Database" button on the INDEX sheet. When the question should be "are you sure?" when OK then it continues to the "Sub Get_Inkoopdelen_Data()" when Cancel it has to return to the sheet "Index""? Thanks in advance! Jasper |
#2
|
|||
|
|||
Sub Bevesiging_ARF_Vullen()
Dim i As Long Dim rng As Range Dim intButton As Integer intButton = MsgBox("Are you sure?.", _ vbOKCancel + vbInformation, "Kosten Database Vullen") If intButton = vbOK Then Get_Inkoopdelen_Data() ElseIf intButton = vbCancel Then Sheets("Index").Select End If End Sub -- HTH RP (remove nothere from the email address if mailing direct) "Jasper" wrote in message ... I tried to make a message box which pops u when I hit a button. The question should be "are you sure?" when OK then it continues to the "Sub Get_Inkoopdelen_Data()" when Cancel it has to return to the sheet "Index". I tried: Sub Bevesiging_ARF_Vullen() Dim i As Long Dim rng As Range Dim intButton As Integer intButton = MsgBox("Is het bron bestand geopend?" & vbNewLine "Klick "OK" om te vervolgen. Klick "Cancel" om terug te keren.", vbOKCancel + vbInformation, "Kosten Database Vullen") If intButton = vbCancel Then Exit Sub If intButton = vbOK Then Sheets("Index").Select End If Next i End Sub MY QUESTION: "What code should I use to "get a message box which pops u when I hit the "Fill Database" button on the INDEX sheet. When the question should be "are you sure?" when OK then it continues to the "Sub Get_Inkoopdelen_Data()" when Cancel it has to return to the sheet "Index""? Thanks in advance! Jasper |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help with MsgBox... | Excel Worksheet Functions | |||
Select non-consecutive rows | Excel Discussion (Misc queries) | |||
Problem with array and msgbox | Excel Worksheet Functions | |||
Problem with array and msgbox | Excel Worksheet Functions | |||
Problem with array and msgbox | Excel Worksheet Functions |