When it crashes the error is highlighted on this line:
I changed the declaration from this:
to this:
but it still crashes.
The code is from a datepicker application that I found in order to try and find something other than excels own 'DTPicker' which crashes on 64bit machines.
Code:
Me.Caption = VBA.UCase$([COLOR=#ff0000][B][FONT=arial black]Format[/FONT][/B][/COLOR]$(VBA.Date, "yyyy - mmmm ")) & VBA.Day(VBA.Date) _
& " (" & VBA.Date & ")"
I changed the declaration from this:
Code:
Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
to this:
Code:
Private Declare PtrSafe Function GetKeyState Lib "user32" (ByVal nVirtKey As LongPtr) As Integer
but it still crashes.
The code is from a datepicker application that I found in order to try and find something other than excels own 'DTPicker' which crashes on 64bit machines.