Your modules may require variables if you have selected "Require Variable Declaration" in the Code Settings section on the Editor tab from the Tools > Options menu in the VBE. Deselect that box and the code should work.
It is usually a good idea to have that box selected though, and simply declare your variables with each procedure.
Tom Urtis
Thanks so much for your help and patience. I deselected the declare variable option but I continue to get the below mentioned error. How can I go ahead and declare this variable? Thanks again :-)
I'm not sure if this is the answer, but if "Option Explicit" appears at the head of your module, then delete that line. Again, this is not the best way to go about solving this sort of problem, but it would work in this case. If you do not see Option Explicit, then I am out of ideas for now.
Tom U. Thanks so much for your help and patience. I deselected the declare variable option but I continue to get the below mentioned error. How can I go ahead and declare this variable? Thanks again :-)
I used a Dim command and that worked for hiding two columns containing intergers totaling 0.
How can this be modified to do the following:
If Q=0 AND D="" Then hide the entire row
column Q contains integers & D contains strings so I would need to be able to work in a dim to make the variable names different for each column.
Any ideas? Thanks :-)