There is a character limit which will stop you before too long.
You used to be able to overcome it, but I think it stopped working a few releases ago.
Macro features are more reliable if you want to execute some code automatically (e.g. on Rebuild)
EDIT: I may be thinking of Custom Properties, where you can also put code. Not sure about equations.
What version of SolidWorks are you using? SolidWorks ruined the functionality of VBA in equations a few releases ago. They are now almost impossible to implement, and I wouldn't recommend it.
I'm using 2016 right now. My ultimate goal is to move as much as possible to a design table and utilize the application dependent visual basic in excel, but for testing and development purposes, I would like to for now, keep it in the equations. Yes, I'm finding that using visual basic in equations is very constrained, however the majority of what I'm doing is just nest IF THEN statements so it works well enough for my purposes (for now).