Torstein, what if you set the "enable" property of the textbox to be false, and then set it to true in the UserForm initialize? In Thisworkbook: Private Declare Function sndPlaySound32 _ Sub SoundTest() In the UserForm code: Private Sub UserForm_Initialize() Tim
Lib "winmm.dll" _
Alias "sndPlaySoundA" ( _
ByVal lpszSoundName As String, _
ByVal uFlags As Long) As Long
sndPlaySound32 "C:\Windows\Media\Chimes.wav", 0&
UserForm1.Show
End Sub
TextBox1.Enabled = True
End Sub
From: "Torstein Johnsen sejohnse@yahoo.no [ExcelVBA]" <ExcelVBA@yahoogroups.com>
Sent: Tuesday, September 23, 2014 3:39am
To: "ExcelVBA@yahoogroups.com" <ExcelVBA@yahoogroups.com>
Subject: Vedr: [ExcelVBA] Preventing keyboard use before userform shows
End Sub
Posted by: twlewis@reagan.com
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (15) |
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