excel - Building a string and using it as the function array name -
i'm not sure how or if can this... want build function name using "ap1", i'm able do, i'm getting "expected array" error. thoughts? i've been staring @ long.
here's piece of code:
dim ap range dim newnum0 string dim ap1 variant dim strswprog string dim strswtype string if strswprog = "add port" ap1 = strswtype & "_addport" each ap in newrange if ap > 0 newnum0 = ap ap = ap1(newnum0) 'here's problem ap.value = newnum0 end if next ap end if
from comment:
the strswtype value dms100 , i'm adding "_addport" onto so, ap1 = "dms100_addport". i'm sending newnum0 value function called dms100_addport. there way without having set like: ap = dms100_addport(newnum0) send function?
to so, use application.run method:
ap = application.run(ap1, newnum0)
Comments
Post a Comment