Kamis, 18 September 2014

RE: [ExcelVBA] Preventing keyboard use before userform shows

 

Hi Torstein

 

The code to display the form executes as soon as the computer asks the sound to start playing, not necessarily when the sound has finished playing.

 

Many ways to do this, but just insert a wait statement Application.Wait (Now() + "00:00:02") or use "sleep" as per http://www.ozgrid.com/forum/showthread.php?t=89193

 

 

Paul

 

 

From: ExcelVBA@yahoogroups.com [mailto:ExcelVBA@yahoogroups.com]
Sent: Thursday, 18 September 2014 4:43 PM
To: ExcelVBA@yahoogroups.com
Subject: [ExcelVBA] Preventing keyboard use before userform shows

 

 

I'm making a memory test in Excel.

 

I play a sound With some numbers and I want the user to Write the numbers in a userform after the sound have been played.

 

But now the user is able to Write the numbers while the sound is playing, then this numbers appears in the one and only textbox I have in the userform.

 

Can I prevent this?

 

Here is my code:

 

sndPlaySound32 "D:\data-filer\data\yrkespsyk\tallhukommelse\lyder\" & lydfilnavn, 0&

 

 UserForm1.Show

 

Thanks in advance

 

Torstein
 

__._,_.___

Posted by: Paul Vermeulen <paul.vermeulen@vulcantech.com.au>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

Improvements in Yahoo Groups Search
Searching for new groups to join is easier than ever. We've honed our algorithm to bring you better search results based on relevance and activity. Try it today!

----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------

.

__,_._,___

Tidak ada komentar:

Posting Komentar