I've created a VBA Userform in Excel, where the user selects several ranges. Within the user form, I have input validation through a series of If then MsgBox statements.
As part of this, I need to take the inputted range and use it as a variable.
Assuming that the range is Me.ActDurations, I tried to use this:
dim ActDur as range
set ActDur = Me.ActDurations
I've also tried:
set ActDur = Me.ActDurations.Value
And that doesn't work either. What is the proper syntax for this? Using the first type gives me a type mismatch error.