ResearchGuyDerrick
New Member
- Joined
- Apr 11, 2023
- Messages
- 1
- Office Version
- 365
- Platform
- Windows
I've written a macro that begins by asking the user a yes/no question (see below). I have no problem running it on my Windows machine, but my boss is on a Mac and receives a Run-time error 6: Overflow error message. When he debugs, it points him to the If AnswerYes = vbYes Then line. The error occurs whether he selects Yes or No in the dialog box. Is there a fix to this issue? We tried installing available Excel software updates but that did not fix it. Thanks in advance!
VBA Code:
Dim AnswerYes As String
Dim AnswerNo As String
AnswerYes = MsgBox("Do you want to net some values into an All Other grouping?", vbQuestion + vbYesNo, "User Repsonse")
If AnswerYes = vbYes Then
Dim OtherThreshold As Single
OtherThreshold = InputBox("What's the maximum loyalty you want to include in the All Other grouping? Enter number as a decimal.", "Maximum Loyalty", 0.35)
End If