I am not quite sure how to handle this data type selection. Any helpwould be greatly appreciated.Everything I have read has said to not use the Variant Data type. Inthis situation it seems my only option.1. Is it the correct choice for UpperRangeVal and LowerRangeVal?2. If it is the correct choice should I declare it as Variant asdone?Any suggestions would be helpful. Thanks.Sub MoveRange()Const DRange As Integer = 35Dim TopPart As LongDim TopPartA As LongDim GColumn As StringDim GTop As StringDim GTopA As StringDim BodyB As StringDim BodyA As StringDim TimerRange As LongDim UpperRangeVal as VariantDim LowerRangeVal as VariantTimerRange = Range("O10").Value 'Cell O10 = 30MsgBox TypeName(TimerRange)TopPart = DRange - TimerRange 'Range("O10").ValueMsgBox TypeName(TopPart)TopPartA = TopPart - 1MsgBox TypeName(TopPartA)GColumn = "G"MsgBox TypeName(GColumn)GTop = GColumn & TopPartMsgBox TypeName(GTop)GTopA = GColumn & TopPartAMsgBox TypeName(GTopA)BodyB = GTop & ":J33"MsgBox TypeName(BodyB)BodyA = GTopA & ":J32"MsgBox TypeName(BodyA)UpperRangeVal = Range(BodyA).ValueLowerRangeVal = Range(BodyB).ValueUpperRangeVal = LowerRangeVal'Range(BodyA).Value = Range(BodyB).Value'MsgBox TypeName(Range(BodyA).Value)End Sub()
Variants can be very handy. No need to avoid them really, unless youare concerned about speed or memory footprint. If your code workswith Variants, use them.