Hi Orange - thanks for the prompt reply. The DMax command was actually working - it was my error calling the variable nNextReg instead of nNextReq.
Thanks again for your help.
Hi Orange - thanks for the prompt reply. The DMax command was actually working - it was my error calling the variable nNextReg instead of nNextReq.
Thanks again for your help.
Glad you found the issue and resolved it.
Always use Option Explicit at the beginning(2nd line) of a module. It will find undeclared variables if there are any.