Search This Blog

2020/04/13

vba declare statement 64 bit warning

Declare Sub ... and warning declare statement 64bit warining, that code do not working.

According to Macrosoft doc:
Declare statements with the PtrSafe keyword is the recommended syntax. Declare statements that include PtrSafe work correctly in the VBA version 7 development environment on both 32-bit and 64-bit platforms only after all data types in the Declare statement (parameters and return values) that need to store 64-bit quantities are updated to use LongLong for 64-bit integrals or LongPtr for pointers and handles. To ensure backwards compatibility with VBA version 6 and earlier, use the following construct:

#If VBA7 Then 
Declare PtrSafe Sub... 
#Else 
Declare Sub... 
#EndIf

2020/04/08

Make a float button in your web page

No need to write JavaScript, just CSS and working in most popular browsers.

<style>
.floatButton {
  z-index: 1000;
  display: block;
  position: fixed;
  bottom: 120px;
  right: 120px;
}
</style>
<div class="floatButton"><button>float </button></div>

z-index: 1000; display: block; position: fixed; is important.