PDA

View Full Version : Set Cell Value As Variable?



mfleming
02-06-2011, 03:20 PM
Hi.

I want to set a variable as a specific cell value.

I have tried both:
CurCell = Range(3, NextPos).Value

&

CurCell = Cells(3, NextPos).Value

Without any success. What am I doing wrong?

Dim inclVar As String
Dim inclVar2 As String
Dim Var1 As Integer
Dim iCount As Integer
Dim CurCell As Range 'I tried As Integer as Well
Dim NextPos As Integer

ReDim ParamArry(ColCount)
NextPos = 2 'Sets start of setting variables to Column B

For iCount = 1 To ColCount
CurCell = Range(3, NextPos).Value
ParamArry(iCount) = CurCell
NextPos = NextPos + 1
Next iCount


Thanks

mfleming
02-06-2011, 03:26 PM
Nevermind. Fixed

CurCell = Cells(3, NextPos).Value