Telling a procedure to end

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top