C
c mateland
I'm using a simple Kill statement in a auto_open ppa that refuses to
run correctly. I get a permission denial (70), but it seems to be a
just problem with timing. In debugging, I can step through without a
hiccup, but when I run the code, it fails at the Kill statement. Yet
when I continue the run with F5 or step through it, the Kill statement
excecutes fine again.
It's as if PowerPoint wanted to wait a minute for the actions to catch
up or something.
FWIW, the file being killed is a ppa that was lines earlier removed,
unloaded, unautoloaded, etc. from my addins. I then delete the file.
Pretty simple, I would think.
I tried DoEvents after each removal action from my list of addins. But
that didn't work.
Any thoughts or can someone tell me my error?
v2002
FWIW, here's a snippet...
'I just captured the name of the addin I want toasted...
If Application.AddIns(sUserPpaMainName).Loaded = msoTrue Then
Application.AddIns(sUserPpaMainName).Loaded = msoFalse
DoEvents
Application.AddIns(sUserPpaMainName).AutoLoad = msoFalse
Application.AddIns.Remove sUserPpaMainFullPth
DoEvents
End If
Kill sUserPpaMainFullPth
'<choke - until I step through it.>
run correctly. I get a permission denial (70), but it seems to be a
just problem with timing. In debugging, I can step through without a
hiccup, but when I run the code, it fails at the Kill statement. Yet
when I continue the run with F5 or step through it, the Kill statement
excecutes fine again.
It's as if PowerPoint wanted to wait a minute for the actions to catch
up or something.
FWIW, the file being killed is a ppa that was lines earlier removed,
unloaded, unautoloaded, etc. from my addins. I then delete the file.
Pretty simple, I would think.
I tried DoEvents after each removal action from my list of addins. But
that didn't work.
Any thoughts or can someone tell me my error?
v2002
FWIW, here's a snippet...
'I just captured the name of the addin I want toasted...
If Application.AddIns(sUserPpaMainName).Loaded = msoTrue Then
Application.AddIns(sUserPpaMainName).Loaded = msoFalse
DoEvents
Application.AddIns(sUserPpaMainName).AutoLoad = msoFalse
Application.AddIns.Remove sUserPpaMainFullPth
DoEvents
End If
Kill sUserPpaMainFullPth
'<choke - until I step through it.>