Thanks for that. Interestingly it seems the problem only occurs when the macro is run from a command button on the page. If I run it from a button on the quick access toolbar it seems to work, but when from the commandbutton I get the same thing, ie I can't type in the CCs until I have re-clicked elsewhere on the page first. . I had not realised there was a difference when I posted the query, so I guess my follow up question is why does this situation change when the macro is run from a commandbutton on the page? I assume there is some issue around what is 'selected' but I don't know enough to be able to 're-select' the table after locking so I can type into the CCs.
I am running the macro using the call function for the command buttons btw:
Private Sub CommandButton21_Click()
Call Project.LockUnLock
End Sub
Many thanks
|