Forum Discussion
LandyA
Dec 11, 2020Copper Contributor
Get date using InputBox in VBA macro gives "Run-time error '6' - Overflow"
I am trying to read in a start date for a macro in Office 365 Excel for Mac v 16.41 on OS X 10.15.7 and am getting an message "Run-time error '6' - Overflow" after clicking OK in the InputBox. The m...
HansVogelaar
Dec 11, 2020MVP
Try
StartDate = CDate(InputBox("What is the Start Date?", "Start Date"))
or
StartDate = DateValue(InputBox("What is the Start Date?", "Start Date"))
LandyA
Dec 14, 2020Copper Contributor
The version with DateValue() worked. Not sure what has changed, but you got my macros working again. Thanks for the help.
-LandyA