Refer to this question: Let the user click on the cells as their input for an Excel InputBox using VBA.
I use this line of code Set rng = Application.InputBox(Prompt:="Select the cell you want to edit.", Title:="CELL TO EDIT", Type:=8)
to ask the user to select a cell. If the cell that is selected is in column G then I will need to call a subroutine. So, I need to figure out what column the selected cell is in.
Thanks for the help!
If rng.Column = 7 Then
where 7 corresponds to G. Btw, don't forget to add error hadler for case when user press CANCEL and nothing selected – Dmitry Pavlivrng.column
. (Column G = 7.) Is that your question? Oh, simoco. :) – tburIf rng Is Nothing Then Exit Sub
. Put it as the answer and I will accept it. – Tim