Declare x as a public variable as follows:Public x as integerYou might also consider reading up on "public" in the VBE Help file.