Does the function return a value? If not, it shouldn't be a function, it should be a sub.

If it does, make sure you are assigning it to a variable when you call it:

myvariable = BuildTable()