LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Msgbox delayed using AFTERUPDATE

Please help

I have used various afterupdate commands in VB to enable fields and
change the background colour of fields when specific things happen to
fields.

My problem is that I have added a "msgbox..." with a yes-no option in
the afterupdate code BUT the msgbox doesn't appear until the I click the
mouse on another field or on the form itself.

What am I missing to make the popup display straight away.

I can't use _change as the msgbox pops up when the field is populated
when the details are first returned. And, beforeupdate doesn't make any
difference.

cheers
Aaron

Private Sub cbCurrent_AfterUpdate(ByVal Cancel As MSForms.ReturnBoolean)
'================================================= ======================
==
'Transfers information from the clients record to the history screens
when
'the client becomes current again
'================================================= ======================
==
If cbCurrent = "Yes" Then

'Present a confirmation box
Dim Msg2, Style2, Title2, Help2, Ctxt2, Response2, vConfirm2
Msg2 = "Do you want to create a history record for the youth? (A
history record is not required if this is the first time the youth will
be current)" ' Define message.
Style2 = vbYesNo + vbCritical + vbDefaultButton2
' Define buttons.
Title2 = "Please confirm"
' Define title.
Help2 = "DEMO.HLP"
' Define Help file.
Ctxt2 = 1000

'Record response
Response2 = MsgBox(Msg2, Style2, Title2, Help2, Ctxt2)

'Check if Yes or No
If Response2 = vbYes Then ' User chose
Yes

If tbHistRefDate1 = "" Then
tbHistRefDate1 = tbRefDate
tbHistRefSource1 = cbRefSource




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delayed reactions Not too genius! Excel Discussion (Misc queries) 1 September 12th 06 10:39 PM
TextBox on a UserForm -- AfterUpdate Stephen Knapp Excel Programming 2 November 24th 04 07:26 PM
AfterUpdate bforster1[_26_] Excel Programming 1 November 6th 04 07:16 PM
VBA - AfterUpdate TextBox bforster1[_23_] Excel Programming 0 November 5th 04 08:09 PM
AfterUpdate functional equivalent at Cell level? PeteCresswell Excel Programming 2 February 27th 04 03:27 PM


All times are GMT +1. The time now is 10:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"