tiredofit
Well-known Member
- Joined
- Apr 11, 2013
- Messages
- 1,834
- Office Version
- 365
- 2019
- Platform
- Windows
The user brings up a userform which contains a RefEdit box.
The RefEdit box is populated either by selecting a range on the worksheet or typing a value into it.
The variable assigned to the contents of RefEdit is called ChosenCells.
How should ChosenCells be declared? As a Range or Variant?
If I declare it as a range but the user types in a value, it'll crash.
If I declare as a Variant but the user selects a range on the worksheet, the program won't recognise it.
Thanks
The RefEdit box is populated either by selecting a range on the worksheet or typing a value into it.
The variable assigned to the contents of RefEdit is called ChosenCells.
How should ChosenCells be declared? As a Range or Variant?
If I declare it as a range but the user types in a value, it'll crash.
If I declare as a Variant but the user selects a range on the worksheet, the program won't recognise it.
Thanks