The problem is on the previous line no_of_values = ps2000_get_values(ps2000_handle, Values_a(0), 0, 0, 0, overflow, no_of_values) using 0 for ByRef buffer_b, ByRef buffer_c, & ByRef buffer_d Changed to no_of_values = ps2000_get_values(ps2000_handle, Values_a(0), Values_b(0), Values_c(0), Values_d(0)...