Results 1 to 4 of 4

Thread: Macro 32bit vs 64 bit
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Aug 2019
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Macro 32bit vs 64 bit

    Hello. I'm unable to use a macro in a 64 bit version of excel that works in the 32 bit version of Excel. MS's documentation says the following. Can someone provide the known declarations that need to be changed or point me to documentation that say which declaration statements need to be changed?

    "In VBA 7, you must update existing Windows API statements (Declare statements) to work with the 64-bit version. Additionally, you must update address pointers and display window handles in user-defined types that are used by these statements. This is discussed in more detail in this article as well as compatibility issues between the 32-bit and 64-bit versions and suggested solutions."

    Any help is appreciated.

  2. #2
    New Member
    Join Date
    Aug 2019
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Macro 32bit vs 64 bit

    FYI, the declarations made in my macro are...

    Dim TrxRows As Range, xCell As Range, dCell As Range
    Dim ShtVis As Integer

  3. #3
    New Member
    Join Date
    Aug 2019
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Macro 32bit vs 64 bit

    Sorry for the multiple replies. Here is most of the code. I removed some sections that I don't believe are contributing to the issue but I can/will post the whole thing if needed.

    Code:
    
    
    Code:
    Sub UpdateData()
    
    
        Sheet2.Activate
        If Range("A1048576").End(xlUp).Row = 2 Then Exit Sub
        
        Application.ScreenUpdating = False
        Dim TrxRows As Range, xCell As Range, dCell As Range
        Dim ShtVis As Integer
        
    xxxxx other code xxxxx
        
        Call Placeholders
        
    xxxxx other code xxxxx
        
        ActiveWorkbook.Names.Item("PivotSource").RefersTo = Range("A1:Z" & Cells.Find(What:="*", After:=Range("A1"), LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row)
        ActiveWorkbook.RefreshAll
        Cells.Find(What:="", After:=ActiveCell, LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).Activate
        Range("A1").Activate
        Application.Goto Sheet1.Range("A1"), Scroll:=True
        Sheet3.Visible = ShtVis
            
        Application.ScreenUpdating = True
    
    
    End Sub

  4. #4
    Board Regular Kenneth Hobson's Avatar
    Join Date
    Feb 2007
    Location
    Tecumseh, OK
    Posts
    3,079
    Post Thanks / Like
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Macro 32bit vs 64 bit

    You did not post any API code.

    See these links for bit version specific code and tips.

    https://support.microsoft.com/en-us/...64-bit-support
    http://www.jkp-ads.com/articles/apideclarations.asp

Some videos you may like

User Tag List

Tags for this Thread

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
  •