Get Cell or Range from User

I have been trying to solve a problem where we can get the range from the user so that the macro can be run once the range is selected. I have been visiting sites and going through all the reference to find out but not able to locate what was the problem. I already knew that there is something wrong in my code… I still am not able to find why sometime the code does not work… I am documenting a code that works well…

Sub GetRange_From_User()

Dim oRange As Range

If SelectARange("Please select a range of cells!", "SelectARAnge Demo", oRange) = True Then
MsgBox "You selected:" & oRange.Address(, , , True)
MsgBox "You cancelled"
End If
End Sub



– Selva V Pasupathy


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: