thank you very much On Mon, Jan 23, 2012 at 6:24 PM, NOORAIN ANSARI <noorain.ans...@gmail.com>wrote:
> Dear Shankar, > > Please use.. > > Private Sub txtto_Exit(ByVal Cancel As MSForms.ReturnBoolean) > txtdays.Value = VBA.DateDiff("D", txtfrom.Value, txtto.Value) > End Sub > See attached sheet. > > - > Thanks & regards, > Noorain Ansari > *http://excelmacroworld.blogspot.com/*<http://excelmacroworld.blogspot.com/> > *http://noorain-ansari.blogspot.com/*<http://noorain-ansari.blogspot.com/> > > > On Mon, Jan 23, 2012 at 1:45 PM, Shankar Bheema <shankar.n...@gmail.com>wrote: > >> Dear Experts >> >> I am attaching an userform. In which I want to get the difference of >> days between two dates (it is throwing an error with the code). >> >> Last Leave report and the Leave Report number are the headings for the >> sheet and they should not recur. >> >> If the same employee puts two spells of leave, the name should be shown >> only once in the sheet eg. >> _______________________________________________ >> name From To No. of Days >> Nature of Leave >> >> ---------------------------------------------------------------------------------- >> shankar 01-01-2012 02-01-2012 02 EL >> 04-01-2012 07-01-2012 04 >> EL >> >> >> regards >> shankar >> >> -- >> FORUM RULES (986+ members already BANNED for violation) >> >> 1) Use concise, accurate thread titles. Poor thread titles, like Please >> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice >> will not get quick attention or may not be answered. >> >> 2) Don't post a question in the thread of another member. >> >> 3) Don't post questions regarding breaking or bypassing any security >> measure. >> >> 4) Acknowledge the responses you receive, good or bad. >> >> 5) Cross-promotion of, or links to, forums competitive to this forum in >> signatures are prohibited. >> >> NOTE : Don't ever post personal or confidential data in a workbook. Forum >> owners and members are not responsible for any loss. >> >> >> ------------------------------------------------------------------------------------------------------ >> To post to this group, send email to excel-macros@googlegroups.com >> > > > > - > > -- > FORUM RULES (986+ members already BANNED for violation) > > 1) Use concise, accurate thread titles. Poor thread titles, like Please > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice > will not get quick attention or may not be answered. > > 2) Don't post a question in the thread of another member. > > 3) Don't post questions regarding breaking or bypassing any security > measure. > > 4) Acknowledge the responses you receive, good or bad. > > 5) Cross-promotion of, or links to, forums competitive to this forum in > signatures are prohibited. > > NOTE : Don't ever post personal or confidential data in a workbook. Forum > owners and members are not responsible for any loss. > > > ------------------------------------------------------------------------------------------------------ > To post to this group, send email to excel-macros@googlegroups.com > -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com