View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Telling a procedure to end

If I have been following your threads correctly you have spawned this with
the shell command? The procedure which called the shell command ended when
the player was opened... There is no code here to end. Shell allows you to
essentially run a dos command which works independant of Excel...
--
HTH...

Jim Thomlinson


"Phil1982" wrote:

I'm embarassed to be nearing the end of a beginners VBA course and still have
to ask questions like this:

How can you tell a procedure to stop when you are inside another procedure?

I have created a UserForm where if the user clicks Command Button "Listen"
it plays an mp3 file. I want that file to stop playing when the user clicks
the Command Button "Next".......But it just keeps on playing

I expected there would be a simple end, cancel, stop, finish, quit command.
But I can't get any of them to solve this

An example of one of my guesses is

Private Sub CMDnext_Click()
'Various other changes of values followed by.......
End Sub CMDlisten_Click
End Sub



Thanks once again