Hi,

Its me again.

I have a VBS code which works well in a worksheet when its made to run from tools--->macros---->run function

But falls down when its is called from a procedure in a macro file. The odd thing is that sometimes it works and I have not been able to work out why

This is the macro line that calls the VBA code

=RUN(!Module1.InvoiceToBatch).

The worksheet that has the macro code is opened and hidden away and is linked to the main excell worksheet that has the VBA code.

Can anyone see anything wrong with the call? Can it be modified to work better?

Thanks for any help on this.

T.