Problem with the function CreateWindowEx with Office2013/64bits RRS feed

  • Question

  • Hello All,
    i have a question about the function CreateWindowEx in OfficePro2013
    I have managed to make it work on W7/64bits with Access2013/64bits....(and on all 32bit versions) it works also on my W10/32bits version

     But when i try my database on W10/64bits with Access2013/64bits CreateWindowEx does not return a valid pointer.

    Essentialy it does this in vba :

    lhwndWindow = CreateWindowEx(WS_EX_DLGMODALFRAME, CLASSNAME, TITLE, WS_POPUPWINDOW Or WS_CAPTION, 500, 50, 500, 500, 0&, 0&, 0&, 0&)

    And it fails on my W10/64bits computer with OfficePro2013/64bits installed. (lhwndWindow = 0)

    Can anyone tell me why it is different in W10/64bits and how i should solve this issue ?
     Could this be an antivirus issue ?

    Are there known issues with CreateWindowsEx with W10/64bits ? (cant find any usefull info in these forums)

    On request i can send a sample database showing the problem (file attachments seem not to be possible in this forum)

    Many thanks in advance....

    Sunday, January 15, 2017 4:49 AM

All replies

  • Hi,

    I noticed that the issue is related to the VBA code for CreateWindowsEx function. Please understanding that this forum focuses on general question for Office applications.

    To better resolve your issue, I would move your thread to Visual Basic for Applications forum for further troubleshooting:


    Hope you can find the solution there :)


    Winnie Liang

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, January 16, 2017 7:24 AM
  • In your Office64 version have you used the PtrSafe declaration for CreateWindowEx, and are you returning to lhwndWindow declared as LongPtr?
    Monday, January 16, 2017 12:07 PM