how use office 2010- 64 bit - for all versions and different kernel without any errors

abdelfattah

Well-known Member
Joined
May 3, 2019
Messages
1,433
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
hello
I work at Office 2010 is a 64-bit , but I encounter a problem that my files that I save with the extension xlsb on this version. it does not work on other versions, sometimes occures errors because of the different version or the difference in the kernel
if is there any some lines code add before the code to overcome any error because of the office version ?
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
If your XLSB files have VBA code in them, and it's not working on other versions, it sounds as though you are making API declarations in the code, like:

VBA Code:
Declare PtrSafe Function ...

Is that the case?API Declarations in 64-bit differ from 32-bit declarations, and will cause errors if you try and open either of them on the other system. To avoid this, you need to use conditional compilation, this an instruction to VBA to parse one part of the code and not the other. It looks like:

VBA Code:
#IF VBA7 Then
   ....
#End If

If want the code to then work on 32-bit systems, you will need to provide the corresponding 32-bit versions in the body of the conditional compilation. There is some useful guidance in the comments of the following Mr Excel thread: PtrSafe needed for Win10 64 bit but what about older systems?

Hope that helps.
 
Upvote 0

Forum statistics

Threads
1,216,051
Messages
6,128,505
Members
449,455
Latest member
jesski

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