Using variable for column reference in Excel VBA -
first off - i'm totally new vba. i'm trying understand syntax used if want use variable column header part of range call. ex:
if <= range("table4[*variable*]")(i).value
i'm passing column name function variable (byval variable string), error. if use actual column name works great. should using different syntax?
the issue you're trying pass string "variable" column header , not string you're passing in method. try this, pass in term set in variable "variable":
"table4[" & variable & "]"
Comments
Post a Comment