I want to have the value for my constant be based off the number from an InputBox, Currently I have this in my code:
Option Explicit
Dim chan2 As Double, tmes2 As Double
Private Sub Form_Load()
chan2 = Val(InputBox("How many channels?", "Channels", 16)) + 1
tmes2 = Val(InputBox("How many time changes?", "Times", 10)) + 1
Const chan As Integer = chan2
Const tmes As Integer = tmes2
End Sub
When i go to run it, I get an error message saying "Constant expression Required" I have looked through the FAQs, but couldn't find anything about constants. Any suggestions would be greatly appreciated.
Thanks
Option Explicit
Dim chan2 As Double, tmes2 As Double
Private Sub Form_Load()
chan2 = Val(InputBox("How many channels?", "Channels", 16)) + 1
tmes2 = Val(InputBox("How many time changes?", "Times", 10)) + 1
Const chan As Integer = chan2
Const tmes As Integer = tmes2
End Sub
When i go to run it, I get an error message saying "Constant expression Required" I have looked through the FAQs, but couldn't find anything about constants. Any suggestions would be greatly appreciated.
Thanks