I've been searching for one but it seems as though it's nonexistent. Is it a built in function now?

I tried converting one from VB6 that stapled provided, but that can only go so far without error. If you have one could you send or any alternative?