UserForm1.TextBox1.Value = "G4"
Set CodeRange = Range(UserForm1.TextBox1.Value, Cells(Rows.Count, "G").End(xlUp))
Gives: methog range of object _global failed
Pls some help how to convert value from form to range.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your code looks okay to me, although slightly unorthodox. Have you dimensioned CodeRange as a range?
If the activehseet is a chart sheet you will get that error.
You should also fully qualify your reference with the worksheet or activesheet.
If your code is residing in the Userform module then you can use the Me keyword instead of Userfrom1.
I prefer to get ranges from the user using a input box like this: