Hi I have a couple of problems trying to do calculations on a user form with Excel 2000 I am used to using VBA with Access 2000.
I have created a data worksheet to store the data that I need to keep called (Database) and another to store lists for combo boxes and list boxes called (lists) and another to store constant values that once entered will not be changed and are used to preform calculations called (constants) the Database worksheet has formula and formatting in the cells that preform what I wont it to do. This all seams to work ok.
The user form is to make data entry for the user simple and easy! And the worksheets do everything else!
The problems I am having is on the user form I have a default start time test box and a default finish time text box that when the form is opened it looks at the constants work sheet and if there is any data it puts it into the appropriate text box, all ok so far when a user wishes to change the default data in these text boxes I need to test if they are entering the data correctly, in Access 2000 I would set the defeat format of the text box to Time? Data type=Format(time,”h:mm”) or a or an input mask of “h:mm” so if they did not enter the time in the correct way an error message would pop up and tell them to renter the data the correct way.
I have not been able to find this type of settings in Excel 2000 I have tried testing the data using the beforupdate but it also dos not recognise formatting
The other thing I need to do on the user form with this formatting is calculate the time difference between to two time inputs and come up with a total hours.
I have managed to do all of this in the work sheets and preforms well but not on the user form!
I know that there are differences with VBA for Access and VB for Excel but they are simular!
Can any one offer any help with this?
I have created a data worksheet to store the data that I need to keep called (Database) and another to store lists for combo boxes and list boxes called (lists) and another to store constant values that once entered will not be changed and are used to preform calculations called (constants) the Database worksheet has formula and formatting in the cells that preform what I wont it to do. This all seams to work ok.
The user form is to make data entry for the user simple and easy! And the worksheets do everything else!
The problems I am having is on the user form I have a default start time test box and a default finish time text box that when the form is opened it looks at the constants work sheet and if there is any data it puts it into the appropriate text box, all ok so far when a user wishes to change the default data in these text boxes I need to test if they are entering the data correctly, in Access 2000 I would set the defeat format of the text box to Time? Data type=Format(time,”h:mm”) or a or an input mask of “h:mm” so if they did not enter the time in the correct way an error message would pop up and tell them to renter the data the correct way.
I have not been able to find this type of settings in Excel 2000 I have tried testing the data using the beforupdate but it also dos not recognise formatting
The other thing I need to do on the user form with this formatting is calculate the time difference between to two time inputs and come up with a total hours.
I have managed to do all of this in the work sheets and preforms well but not on the user form!
I know that there are differences with VBA for Access and VB for Excel but they are simular!
Can any one offer any help with this?