change "wb" to "activeworkbook" and see what happens.