Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,564
- Office Version
- 365
- 2016
- Platform
- Windows
Consider this line of code in a standard module:
pgrm_st is publically declared as Double and is supposed to hold the value of a date and a time (bkg_date & value of textbox tb_s1_lwr.
frmservice is declared an object referring to the opyn userform object. Index =1, so the texbox control = tb_s1_lwr which as a text value of "10:00A"
Booking date = 44024.
Instead of getting an anctipated value of 44024.4316666667, I'm getting a Type Mismatch error.
Thoughts?
Code:
pgrm_st = bkg_date + CDbl(frmservice.Controls("tb_s" & index & "_lwr").Value)
pgrm_st is publically declared as Double and is supposed to hold the value of a date and a time (bkg_date & value of textbox tb_s1_lwr.
frmservice is declared an object referring to the opyn userform object. Index =1, so the texbox control = tb_s1_lwr which as a text value of "10:00A"
Booking date = 44024.
Instead of getting an anctipated value of 44024.4316666667, I'm getting a Type Mismatch error.
Thoughts?
Last edited by a moderator: