Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help with textboxes requirements and msgbox

I have 3 textboxes lined up horizontally on a sheet... I have a cmd
button on the far right that loses the focus from the textboxes and
saves the workbook. See below....

'....loses focus of textboxes
Private Sub Commandbutton_Click()
Me.TxBName.Enabled = CBool(Me.TxBName.Value = "")
Me.TxBAddress.Enabled = CBool(Me.TxBAddress.Value = "")
Me.TxBCity.Enabled = CBool(Me.TxBCity.Value = "")
'....saves workbook
ActiveWorkbook.Save
End Sub

My question, how do I force the user to fill all textboxes. For example
an user completes the name and address textboxes but fails to complete
the city textbox... then he/she presses the cmd button... I want a
msgbox to pop up "complete all fields before booking" and would not let
him/her save the workbook. How do I accomplish this???


---
Message posted from http://www.ExcelForum.com/

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
Material Requirements Plan (MRP) and Capacity Requirements Plan (C Tricia Young Excel Worksheet Functions 1 February 1st 07 06:55 AM
Material Requirements Planning-MRP/Capacity Requirements Planning- Tricia Young Excel Discussion (Misc queries) 1 February 1st 07 06:22 AM
MVP Prerequisites/requirements roadkill Excel Discussion (Misc queries) 4 April 4th 06 07:29 PM
Name Range with three requirements Carole O Excel Worksheet Functions 3 May 13th 05 08:22 PM
If statement with two requirements Matt Excel Worksheet Functions 4 February 13th 05 12:49 PM


All times are GMT +1. The time now is 07:02 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"