0

I would love to be able to use the date picker that already exists, but it doesn't exist on the mac version, and this spreadsheet will be accessed by both windows and mac machines.

What a Dave
  • 44
  • 2
  • 12
  • 1
    I don't think there is `Datepicker` in Excel. You can create one though, [try one of the methods outlined in this post](https://stackoverflow.com/questions/12012206/formatting-mm-dd-yyyy-dates-in-textbox-in-vba). I even posted an answer there too. – L42 Feb 08 '18 at 03:12
  • 1
    @L42 This is pretty much what I am looking for. Thanks. – What a Dave Feb 11 '18 at 01:20

1 Answers1

0

You can create a userform that acts as a DateTime Picker that will function on both Windows and Macintosh.

The most noticeable issue will be related to the difference in screen resolution between the two platforms. On the Mac, it’s 96 dpi, where each dot represents a pixel. In Windows, screen resolution is 72 dpi (dots per inch) and each dot represents a point, while pixels are still 96 per inch.

Confusing the issue is that VBA in Windows uses points as the measurement unit for designing UserForms, while VBA on the Mac uses pixels. The result is that without applying any correction, UserForms that come out just right in Windows are only 75% as large on the Mac...

A solution can be to add a procedure that re-sizes the userform accordingly, depending on which system is currently calling the procedure, something like:

Private Sub UserForm_Initialize()
  #If Mac Then
    ResizeUserForm Me
  #End If
End Sub

More info:

ashleedawg
  • 20,365
  • 9
  • 72
  • 105