Excel Passing Wrong Date Value to VBA Function
问题 I have a worksheet with Date values. Excel interprets them correctly as Dates. I have a VBA function that accepts a Date parameter. When I call this function from the worksheet, sometimes it works correctly, and sometimes it doesn't. When I set a breakpoint in the function to examine the value passed in to the function from a cell that is incorrect, I discover that the wrong date is passed to the function--it's a day off from what should be passed to the function. The time value is correct.