0

I have used the color picker code from here: Show color picker for user to choose from in VBA powerpoint

This code is working well in Powerpoint 32 bit vba. But it does not work in 64 bit, MS365. I modified it using Ptrsafe and also changing few long to longptr. But still the colour palette does not appear when I am running the code.

Please help me.

sd dg
  • 1

1 Answers1

0

Try to change to

Private Declare PtrSafe Function ChooseColor_Dlg Lib "comdlg32.dll" Alias "ChooseColorA" (pcc As CHOOSECOLOR_TYPE) As LongPtr

Private Type CHOOSECOLOR_TYPE
lStructSize As LongPtr
hwndOwner As LongPtr
hInstance As LongPtr
rgbResult As LongPtr
lpCustColors As LongPtr
flags As LongPtr
lCustData As LongPtr
lpfnHook As LongPtr
lpTemplateName As String
End Type

And

Static BDF(16) As LongPtr
YasserKhalil
  • 9,138
  • 7
  • 36
  • 95