cssfonseca
New Member
- Joined
- Aug 14, 2018
- Messages
- 19
Hello !
So i want to apply a macro to a column, but it may change the column from user to user.
So, i thought, if the user could indicate for what cell he wants to apply the macro, it would be easier.
But the problem is:
1. I have the macro i want to apply.
2. I have the button
3. i Don't know how i can "capture" the input cell and transform to the adress of the cell.
Like.. the user wants to apply the macro from k3 to the end of the column. I know i can user a input box to capture the value but i dont know how to apply in the macro itself.
Sub NoSpacesD()
Dim w As Range
For Each w In Range("D3:D1000")
w = Replace(w, " ", "")
w = Replace(w, ";", ".")
' see if ends in text, if not, msgbox error
Next
End Sub
but the column will be given by the user.
Can u help me?
So i want to apply a macro to a column, but it may change the column from user to user.
So, i thought, if the user could indicate for what cell he wants to apply the macro, it would be easier.
But the problem is:
1. I have the macro i want to apply.
2. I have the button
3. i Don't know how i can "capture" the input cell and transform to the adress of the cell.
Like.. the user wants to apply the macro from k3 to the end of the column. I know i can user a input box to capture the value but i dont know how to apply in the macro itself.
Sub NoSpacesD()
Dim w As Range
For Each w In Range("D3:D1000")
w = Replace(w, " ", "")
w = Replace(w, ";", ".")
' see if ends in text, if not, msgbox error
Next
End Sub
but the column will be given by the user.
Can u help me?