Thank you for the answer.
I've send a message through Excel. Now I'm going to wait an update.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
I have the latest version of Excel for Mac (16.66.1). I'm facing a bug illustrated by the following examples. What is very strange is that when the variable d is an Integer or a Long, the error does not occur.
The same macros run perfectly on a PC.
Is there a solution or should I wait for an update of Excel?
Thank you.
Option Explicit
Sub test()
Dim msg As String
Dim result As VbMsgBoxResult
Dim d As Double
d = 22
msg = "The value of d is " & d & "."
result = MsgBox(prompt:=msg, Buttons:=vbOKCancel)
d = d + 1 'Run-time error '6': Overflow
End Sub
'This time with a backup of d
Sub test2()
Dim msg As String
Dim result As VbMsgBoxResult
Dim d As Double
Dim d_backup As Double
d = 22
d_backup = d
msg = "The value of d is " & d_backup & "."
result = MsgBox(prompt:=msg, Buttons:=vbOKCancel)
d = d + 1 'Run-time error '6': Overflow
End Sub
Thank you for the answer.
I've send a message through Excel. Now I'm going to wait an update.