2

I need to move a row of data to another worksheet when a user chooses a value in a listbox. I am trying to use the following code to select the row on the new worksheet I want to move the data to:

'Move data to the "Red" worksheet
Sheets("Red").Range ("A11").Select

I am getting an "Object does not support this property or method" error.

What am I doing wrong?

3 Answers 3

4

There should NOT be a space between "Range" and "(".

Sign up to request clarification or add additional context in comments.

Comments

1
  1. Is selecting allowed on your sheet? (= selection not prohibited by protection)
  2. I have noticed a space character between the word Range and ("A11"). This might have caused a syntax error.

1 Comment

actually this is the best answer. troubleshooting plus syntax correction.
0

Use the macro recorder and manually perform the operation you want. Then you can look at the code recorded by Excel and clean it up to suit your needs.

The macro recorder is the easiest way to figure out whatever convoluted syntax VBA wants you to use.

1 Comment

question was, what am i doing wrong, not how can i use the macro recorder, no?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.