when i rebooted and opened Excel, I think it showed that it had closed as if application.quit had not been read.
How would you know this after rebooting?
should I replace t with f a per the page Gasman has given? A very interesting page but my skill level makes it hard for me to understand, sorry
the web page Gasman has given shows /f and /t does / or - make a difference?
Each of the switches do different things
The t switch indicates the time delay in seconds - if omitted a 30 second delay is applied.
The f switch is used to force apps to close without warning. Is that what you want?
In Excel, remove the code line Option Compare Database
I've now tested all 4 functions in both Excel & Access
All work perfectly with the exception of logoff which just closes the application (due to Application.Quit). I'll keep experimenting with that one.
It makes no difference whether you use '-' or '/'
Experimenting with different time intervals suggests 2 or 3 works fine for me. It doesn't matter whether you include the leading zero or not. i.e. 2 or 02 both fine
As for your other question, use the code tag button (#) in the toolbar above the post window
HTH