I'm not sure how or if I can do this... I want to build the function name using "ap1", which I'm able to do, but I'm getting an "expected array" error. Thoughts? I've been staring at this too long.
Here's the piece of code:
Dim ap As Range
Dim newnum0 As String
Dim ap1 As Variant
Dim strswprog as string
dim strswtype as string
If strswprog = "Add PORT" Then
ap1 = strswtype & "_AddPort"
For Each ap In newrange
If ap > 0 Then
newnum0 = ap
ap = ap1(newnum0) 'Here's the problem
ap.Value = newnum0
End If
Next ap
End if