Results 1 to 5 of 5

Thread: VBHTML Maker on XL2010 - 64 Bit
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    mmmm Pizza
    Sandeep Warrier's Avatar
    Join Date
    Oct 2008
    Location
    Mumbai, India
    Posts
    2,672
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default VBHTML Maker on XL2010 - 64 Bit

    Hey All,

    Has anyone used the VB HTML Maker on XL2010 64 Bit? I tried using it and made the following change:

    Code:
    Private Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long
    to
    Code:
    Private Declare PtrSafe Function LockWindowUpdate Lib "user32" (ByVal hwndLock As LongPtr) As LongPtr
    I am however unable to use it. Also, every time I start Excel, I get the error -
    438: Object doesn't support this property or method

    It does not highlight the section of the code that is problematic.

    Any ideas?
    Regards,
    Sandeep


    You can post sample data using any one of the following ways:

    1. Richard Schollar's HTML Maker
    2. Excel Jeanie
    3. Border Copy Paste

    Use code tags [CODE]'Your Code[/CODE]
    for posting codes.

  2. #2
    Board Regular Norie's Avatar
    Join Date
    Apr 2004
    Location
    Stirling, Scotland
    Posts
    75,154
    Post Thanks / Like
    Mentioned
    62 Post(s)
    Tagged
    6 Thread(s)

    Default Re: VBHTML Maker on XL2010 - 64 Bit

    Sandeep

    Does it work without the change?
    If posting code please use code tags.

  3. #3
    Board Regular
    mmmm Pizza
    Sandeep Warrier's Avatar
    Join Date
    Oct 2008
    Location
    Mumbai, India
    Posts
    2,672
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: VBHTML Maker on XL2010 - 64 Bit

    Hi Norie,

    Nopes. Without the change it gives me a compile error saying:

    The code in this project must be updated for use on 64-bit systems. Please review and update Declare statements and then mark them with the PtrSafe attribute.

    On making the change, it does not give me the compile error, but nothing else works. On selecting "Convert selected code as HTML" from the menu, nothing happens (no errors and nothing gets copied to the clipboard). When I restart Excel, it gives me the 438 error.
    Regards,
    Sandeep


    You can post sample data using any one of the following ways:

    1. Richard Schollar's HTML Maker
    2. Excel Jeanie
    3. Border Copy Paste

    Use code tags [CODE]'Your Code[/CODE]
    for posting codes.

  4. #4
    Board Regular Norie's Avatar
    Join Date
    Apr 2004
    Location
    Stirling, Scotland
    Posts
    75,154
    Post Thanks / Like
    Mentioned
    62 Post(s)
    Tagged
    6 Thread(s)

    Default Re: VBHTML Maker on XL2010 - 64 Bit

    Apparently not all API functions/declarations changed.

    Here's a list of those that apparently did http://msdn.microsoft.com/en-us/libr...63(VS.85).aspx.

    I can't see LockWindowsUpdate in it.

    Mind you I have seen people having similar problems.

    Have you tried using the comipler directive approach?
    Code:
    #If VBA7 Then
        Private Declare PtrSafe Function LockWindowUpdate Lib "user32" (ByVal hwndLock As LongPtr) As LongPtr
    #Else
        Private Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long
    #End If
    I can't test that on 64-bit Excel (because I'm not going to install that, ever*) but I am on a 64-bit machine.

    * probably an exaggeration but I don't see the need for it, especially when it would be the only version I could install.

    Actually when I come to think of it I might give it a go.
    If posting code please use code tags.

  5. #5
    Board Regular
    mmmm Pizza
    Sandeep Warrier's Avatar
    Join Date
    Oct 2008
    Location
    Mumbai, India
    Posts
    2,672
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: VBHTML Maker on XL2010 - 64 Bit

    Quote Originally Posted by Norie View Post
    Apparently not all API functions/declarations changed.

    Here's a list of those that apparently did http://msdn.microsoft.com/en-us/library/aa383663(VS.85).aspx.

    I can't see LockWindowsUpdate in it.

    Mind you I have seen people having similar problems.

    Have you tried using the comipler directive approach?
    Code:
    #If VBA7 Then
        Private Declare PtrSafe Function LockWindowUpdate Lib "user32" (ByVal hwndLock As LongPtr) As LongPtr
    #Else
        Private Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long
    #End If
    Hi Norie,

    I did actually see this yesterday, at http://www.vbaexpress.com/forum/arch...p/t-34477.html

    I felt that since the only version installed is the 64-bit version, this would be kind of redundant. However I did try it out now and I get the same response as Zack did. Nothing happens and the 32-bit portion of the code is in red. On restarting Excel I still get the same 438 error.

    I did manage to get Richard's HTML Maker add-in to work by changing the API calls there (OpenClipboard, EmptyClipboard and CloseClipboard) using PtrSafe even though I didn't see them in the MSDN list.

    Quote Originally Posted by Norie View Post
    I can't test that on 64-bit Excel (because I'm not going to install that, ever*) but I am on a 64-bit machine.

    * probably an exaggeration but I don't see the need for it, especially when it would be the only version I could install.

    Actually when I come to think of it I might give it a go.
    Our office recently upgraded everyone to Win7 + Office 2010 64-Bit editions. The first major setback I came across was that there was no 64-bit version of ASAP Utilities (one of my favourite add-ins)
    Regards,
    Sandeep


    You can post sample data using any one of the following ways:

    1. Richard Schollar's HTML Maker
    2. Excel Jeanie
    3. Border Copy Paste

    Use code tags [CODE]'Your Code[/CODE]
    for posting codes.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •