Share via

How do I reference the RowSource for a UserForm ListBox when it is on another sheet?

Anonymous
2018-02-08T13:14:48+00:00

Everything I try returns "Could not set the RowSource property. Invalid property value.

I want to use my sheet name "Countries-Alphabetical" for 2 ListBoxes.

Countries-Alphabetical!A2:A231 does not work.

A2:A231 does work but the worksheet has to be activated, which I don't want.

Must be simple.................. please help :-)

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2018-02-08T14:33:01+00:00

Since the sheet name contains a hyphen, you must enclose it in single straight quotes:

'Countries-Alphabetical'!A2:A231

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2018-02-08T14:36:09+00:00

    Thank you Hans, I must have tried everything but! One to remember. :-)

    Was this answer helpful?

    0 comments No comments