Message Box With "Do Not Remind Me Again"

SAMUSER

Board Regular
Joined
Jul 27, 2012
Messages
82
Hi Guys,

I have a simple message box, but I want to change it to one that has a checkbox with a "Do not remind me again" button. Any tips on it could be done?

The code I am using is pasted below. The Msg Box is the 4th last line of the code.

Code:
ub getResults()


ActiveSheet.Unprotect Password:="Syncos123!"


Sheets("selector").Activate


Dim resultDrop As Range
Set resultDrop = Sheets("Selector").Range("A12")


Dim outcomeDrop As Range
Set outcomeDrop = Sheets("Selector").Range("A24")


Dim dOutcomeSelect As String
dOutcomeSelect = Sheets("Selector").Range("A8").Value


'Sheets("Master List").Activate


Dim dOutcomeList As Range
Set dOutcomeList = Sheets("Master List").Range("C2:BD4")


Dim masterRange As Range
Set masterRange = Sheets("Master List").Range("C2:BD28")


Dim dOutcomePos As Range
Set dOutcomePos = masterRange.Find(dOutcomeSelect)


'Exit Sub
'On Error GoTo ErrorHandler


'ErrorHandler:
'MsgBox "You cannot paste information. Press ctrl+Z to undo, and then select from the drop-down menu again"


'Resume Next


Dim resultQuant As Long
resultQuant = dOutcomePos.Offset(2, 0).Value


Dim outcomeQuant As Long
outcomeQuant = dOutcomePos.Offset(2, 1).Value


Dim resultRange As Range
Set resultRange = Range(dOutcomePos.Offset(3, 0), dOutcomePos.Offset(resultQuant + 2, 0))


Dim outcomeRange As Range
Set outcomeRange = Range(dOutcomePos.Offset(3, 1), dOutcomePos.Offset(outcomeQuant + 2, 1))


ActiveWorkbook.Names.Add Name:="ValListR", RefersTo:=resultRange
 
ActiveWorkbook.Names.Add Name:="ValListO", RefersTo:=outcomeRange


With resultDrop.Validation
        .Delete
        .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:="=ValListR"
        .IgnoreBlank = True
        .InCellDropdown = True
        .InputTitle = ""
        .ErrorTitle = ""
        .InputMessage = ""
        .ErrorMessage = ""
        .ShowInput = True
        .ShowError = True
    End With




With outcomeDrop.Validation
        .Delete
        .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:="=ValListO"
        .IgnoreBlank = True
        .InCellDropdown = True
        .InputTitle = ""
        .ErrorTitle = ""
        .InputMessage = ""
        .ErrorMessage = ""
        .ShowInput = True
        .ShowError = True
    End With


resultDrop.Value = resultRange(1, 1).Value
outcomeDrop.Value = outcomeRange(1, 1).Value


MsgBox "The 'Results' and 'Outcomes' have been updated based on your selection of the 'Desired Outcome'. Please select the applicable Result and Outcome from the drop-down menu and copy it using the button before pasting it into GAIMS."
ActiveSheet.Protect Password:="Syncos123!", DrawingObjects:=True, Contents:=True, Scenarios:=True


End Sub
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
You'll need to use a userform for that. A msgbox is typically just equipped with providing information, but beyond that, it's pretty useless. You can do anything with a userform though.
 
Upvote 0
you could do something like the following, this will allow one use of that part of the code only during using the workbook

Sub SendTheMessage()
Static i As Integer
If i = 0 Then
MsgBox "hello world"
i = i + 1
End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,196,101
Messages
6,013,459
Members
441,767
Latest member
Craigh4444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top