Help with VBA

B

brian

Two questions:
1.What's the VBA code that when executed gives me the column number of the
active cell?
2. How can I then reference this value in a following if then statement?

Thanks for any help.
Brian
 
B

brian

Thank you raypayette.
Do you mean that c and not "c" now assumes a numeric value? And that this
value changes as the cursor moves around?

Brian
 
R

raypayette

VBA assumes that a variable that wasn't defined is a Variant, not a
number, not a string.
Had "Option explicit" been specified, it should have been defined
either as a Variant or an Integer.
The advantage of a Variant is that it can be reused as need be in a
different context.
The variable c changes value with the current cell that is selected.
 
B

brian

Thought I had lost this thread after spending time reformatting my HD. But
downloading 1000 headers did it. Thanks again raypayette.

Brian
 
Top