ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Returning The Column Number ? (https://www.excelbanter.com/excel-programming/304628-returning-column-number.html)

Frank Kabel

Returning The Column Number ?
 
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

--
Regards
Frank Kabel
Frankfurt, Germany

"MAS" schrieb im Newsbeitrag
...
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





William[_2_]

Returning The Column Number ?
 
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



"MAS" wrote in message
...
| 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
|
|
|



MAS

Returning The Column Number ?
 
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





All times are GMT +1. The time now is 12:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com