Juggler_IN
Active Member
- Joined
- Nov 19, 2014
- Messages
- 358
- Office Version
- 2003 or older
- Platform
- Windows
I want to convert variable "COLUMNS" as an Integer from the current classification of "CONSTANT." When I change Const COLUMNS to Dim COLUMNS as Integer, I am getting an error in [Dim RN(1 To COLUMNS) As Range] statement. It says constant expression required. How can this be resolved? Basically I want to capture the number of columns via an input box and not keep it as constant.
Code:
Const COLUMNS = 31
Dim s1 As Worksheet
Dim s2 As Worksheet
Dim Lags
Dim RN(1 To COLUMNS) As Range