Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Message Box Execution


Hi~

Please help VB debuggers...

I have a textbox inside a frame.
In addition, I validated the textbox to prompt a message
box "enter text" if textbox is empty when OK Button is triggered.
I did enter text in the textbox and the message box still displays after
executing code in OK Button.

This is code I wrote for textbox:
Private Sub txtoffice_Exit(ByVal Cancel As MSForms.ReturnBoolean)
'display msg if textbox office is empty
If txtoffice.Text = "" Then
MsgBox "Enter Office Location"
Cancel = True
End If
End Sub

Thanks in advance for helping & have a happy day!!


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Message Box Execution

Try adding this in

Private Sub Frame1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtoffice_Exit Cancel
End Sub

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Myrna Rodriguez" wrote in message
...

Hi~

Please help VB debuggers...

I have a textbox inside a frame.
In addition, I validated the textbox to prompt a message
box "enter text" if textbox is empty when OK Button is triggered.
I did enter text in the textbox and the message box still displays after
executing code in OK Button.

This is code I wrote for textbox:
Private Sub txtoffice_Exit(ByVal Cancel As MSForms.ReturnBoolean)
'display msg if textbox office is empty
If txtoffice.Text = "" Then
MsgBox "Enter Office Location"
Cancel = True
End If
End Sub

Thanks in advance for helping & have a happy day!!


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!



Reply
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
Code Execution Message canderson Excel Discussion (Misc queries) 1 October 9th 09 04:28 PM
How to ged rid of the "Execution Error 9" message at the file opening? frenchbox Excel Discussion (Misc queries) 0 July 31st 06 03:28 PM
function execution matty_g Excel Worksheet Functions 2 June 9th 05 12:05 AM
Pause in execution Tom Ogilvy Excel Programming 0 September 4th 03 05:33 PM


All times are GMT +1. The time now is 07:50 PM.

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

About Us

"It's about Microsoft Excel"