Macro 32bit vs 64 bit

Alex1234567

New Member
Joined
Aug 22, 2019
Messages
12
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.
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
FYI, the declarations made in my macro are...

Dim TrxRows As Range, xCell As Range, dCell As Range
Dim ShtVis As Integer
 
Upvote 0
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.

Rich (BB code):
Rich (BB 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
 
Upvote 0

Forum statistics

Threads
1,214,397
Messages
6,119,273
Members
448,883
Latest member
fyfe54

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top