I am not experienced at vba so thank you for understanding.
I tested some old macros in office 365, previously I worked with excel 2016.
I read that some macros might not work properly because of the Long variable declaration. -
As I understand correctly Long has 4bit and LongLong has 8bit. There is also sth like ►LongPtr which has 4bit-when other than VBA7 and 8bit-in VBA7.
My question is as follows: how it is possible that in excel365 I can still use a normal Long variable?

Longdatatype isn't deadWhat you are probably referring to is that using API functions (API - Application Programming Interface) you have to take care of the different environments. These system functions do demand
LongPtrtypes for for pointers to a → handle or → memory location (note the specialPtrSafeprefix!).A VBA procedure, contrary to cited API functions isn't forced to "prohibit" a
Longdatatype for a variable, just as little as you will be forced to do withoutInteger(though btw internally VBA prefersLongintegers).Further notes to
LongPtrdeclarationsAs a window handle is declared as
LongPtrin Office 2010 or higher and asLongin versions before, it was necessary to differentiate between the different versions by conditional compile constants (#If VBA7 Then..#End If) , for instanceNote that some API functions need to use also a conditional
Win64constant to identify actually installed 64bit Office systems; I mentioned already that frequently Office is installed as 32bit by default.LongPtr, however is not a true data type because it transforms to the right datatype depending on the actual 32/64-bit environment.Note that 64-bit systems can be installed either as 32-bit office or 64 bit office.
LongPtrenables writing portable code that can run in both 32-bit and 64-bit environments.Hint: Take care to declare assigned API variables as well by the appropriate datatype. If you differentiate between versions via conditional compile constants, you have to do so with the referring variables within your own procedures, too.
Related links
MS Language reference: LongPtr data type
Compatibility of Office 2010 versions
Declaring API functions in 64 bit Office
64 bit VBA Overview
Further recommended readings (thx @GSerg :-)
Citing @GSerg in the following posts:
LongPtrdatatype for VBA6 and VBA7