User Form Security Question

H

harpscardiff

Hi,

I'm creating a form, which onces completed transfers the data over to
the spreadsheet. But the guys in work don't really pay much attention
to what they have entered , so i was wondering is there any way to make
the user double check every entry?

I was thinking, once the user clicks ok, a msgbox would appear giving
the user the value they entered, click ok if correct or cancel to
amend.

Is there a easy way to do this?

Cheers.
 
D

dominicb

Good afternoon harpscardiff

You've not give much information re what sort of controls you are using
on your userform (textboxes, listboxes, checkboxes etc?) so this answer
is a bit on the general side.

msg=""
msg = msg & "You have entered :" & TextBox1.Value
response = MsgBox(msg, vbYesNo)
If response = vbYes Then
' user clicks yes
End If
If response = vbNo Then
' user clicks no
End If


Does that help?

DominicB
 
H

harpscardiff

Conrad said:
If you're using a form, you're going to have to use VBA to check the
validity of the user's data. I do this frequently: for example, to
check the
year that a patient was admitted to a hospital. If the year is 2105,
there's
a good chance that the data isn't valid.

An alternative -- and I think it's a good one -- is to forego the form
and
have the user enter the data directly on the worksheet. If you do that,
you
can use Data | Validation to limit a user's input to values that you
want to
permit.

--
C^2
Conrad Carlberg

Excel Sales Forecasting for Dummies, Wiley, 2005


"harpscardiff"
<[email protected]>
wrote in message

Thanks for your reply guys, much appreciated......apologies for the
limited data.

Just to add to my mail.....the form has 5 Frames
Frame 1 (user details) = 2 text boxes
Frame 2 (Client Details)= 5 text boxes
Frame 3 (Payment Details)= 3 text boxes and 2 list boxes
Frame 4 (Monetary Details) = 2 text boxes
Frame 5 (Address and Banking Details)= 13 text boxes.

The form was just a spreadsheet before, but still had problems, only
thing that worked was the date being correct.

DominicB, I can see what the msgbox do, but if the user click no, is
there any way to go to the text box and edit the value?

Thanks again.
 
Top