ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Forcing users to complete a form (https://www.excelbanter.com/excel-programming/345804-forcing-users-complete-form.html)

BK

Forcing users to complete a form
 
I am setting up a form for to help calculate sales in the store I work
in. There are several managers who only enter enough data into the form
to get the numbers to balance. They are leaving out other informatiun
such as customer count, total credit transactions, "signatures" etc. I
want to force them to put in all information before they can print or
close the application. Is there any way to do this?


Jeremy

davidm

Forcing users to complete a form
 

to get you startes try:

If Application.CountA(<your range) < <specify number Then

Msgbox "Complete column before you can print..."

End if



david


--
davidm
------------------------------------------------------------------------
davidm's Profile: http://www.excelforum.com/member.php...o&userid=20645
View this thread: http://www.excelforum.com/showthread...hreadid=485748


BoyP

Forcing users to complete a form
 
In the particular control, say TextBox1.

Create an _Exit event, which look like this:

Private Sub TextBox1_Exit (ByVal Cancel As MSForms.ReturnBoolean)
if len(trim(UserForm1.TextBox1.Value))=0 Then
msgbox "Invalid Input", vbCritical, "Error Message"
Cancel = True
end if
End Sub

As long as you set the value of the Cancel to TRUE, the user cannot get out
of the TextBox1 input process.

Hope this help you

BoyP




All times are GMT +1. The time now is 02:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com