Returning The Column Number ?

F

Frank Kabel

Hi
use the column property of the range object.
e.g. if you store the range returned by the inputboy in the object
variable rng use
msgbox rng.column
 
W

William

Hi Mas

Sub test()
Dim x As Range
Set x = Application.InputBox(Prompt:="Select cell", _
Title:="Whatever", Type:=8)
On Error Resume Next
MsgBox x.Column
End Sub


XL2002
Regards

William

[email protected]

| Hi,
|
| I am looking for the code or even just the vba function that will return
| with the column letter or number that a user clicks in, in response to an
| Inbox.
|
| For example; When the input box comes up it prompts the user to select the
| cell they are interested in.
|
| The user clicks on that cell and clicks on OK
|
| I have no problem handling the value within the cell that was clicked on
but
| what I want to read is the column that the person clicked in ?
|
| MAS
|
|
|
 
M

MAS

Hi,

I am looking for the code or even just the vba function that will return
with the column letter or number that a user clicks in, in response to an
Inbox.

For example; When the input box comes up it prompts the user to select the
cell they are interested in.

The user clicks on that cell and clicks on OK

I have no problem handling the value within the cell that was clicked on but
what I want to read is the column that the person clicked in ?

MAS
 
Top