I'm not sure it can. I've worked with VBA professionally and it always needs to run within an Office application like Access of Excel. A transpiler is probably doable, but I don't think it would be easy or even possible to port things using VBA to webasm.