that is because "Trip calculation error"
is in the position for the button/icon/msgtype
IMHO: It's usually better to build your string first and then insert it into the function.
In anycase, add another comma before the "Trip...", and I prefer to specify the button type; thus, you now have:
- MsgBox "Total trip miles = " & lngTripMiles & _
-
" and the status miles total = " _
-
& (lngLoadedMiles + lngEmptyMiles + lngBobtailMiles) & ".", vbOKOnly, "Trip calculation error"
-
IMHO Ideally you would
- (...)dim strMsg as String
-
strMsg = "Total trip miles = " & lngTripMiles & _
-
" and the status miles total = " _
-
& (lngLoadedMiles + lngEmptyMiles + lngBobtailMiles) & "."
-
'
-
MsgBox strMsg,vbOKOnly,"Trip calculation error"
-
(...)
This way if you need to you can debug.print the string.