Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() c = ActiveCell.Column If ActiveCell.Column = c Then -- raypayette ------------------------------------------------------------------------ raypayette's Profile: http://www.excelforum.com/member.php...o&userid=29569 View this thread: http://www.excelforum.com/showthread...hreadid=566489 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 "raypayette" wrote in message ... c = ActiveCell.Column If ActiveCell.Column = c Then -- raypayette ------------------------------------------------------------------------ raypayette's Profile: http://www.excelforum.com/member.php...o&userid=29569 View this thread: http://www.excelforum.com/showthread...hreadid=566489 |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() 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. -- raypayette ------------------------------------------------------------------------ raypayette's Profile: http://www.excelforum.com/member.php...o&userid=29569 View this thread: http://www.excelforum.com/showthread...hreadid=566489 |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thought I had lost this thread after spending time reformatting my HD. But
downloading 1000 headers did it. Thanks again raypayette. Brian "raypayette" wrote in message ... 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. -- raypayette ------------------------------------------------------------------------ raypayette's Profile: http://www.excelforum.com/member.php...o&userid=29569 View this thread: http://www.excelforum.com/showthread...hreadid=566489 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|