I am new to this API stuff, so forgive me if this request is very basic.

I want to run an Access macro from a VB prog. This I can do but the macro has not finished when the program moves on to the next bit of code.

I therefore need a way of halting the code until the macro has finished running. Some one suggested that I could make use of the API call WAITFORSINGLEOBJECT but I am not quite sure how to go about coding this.

Can someone please help?