Obviously it will not compile when you define variables like this

Dim dig_T1 As Word, dig_P1 As Word, dig_H1 As Byte, dig_H2 As Integer

Use the correct PBP syntax and try again.

Ioannis