THANK YOU SO MUCH SAM. On Fri, Sep 16, 2011 at 6:50 AM, Sam Mathai Chacko <samde...@gmail.com>wrote:
> Not sure if you can. But you can use this > > Private Sub ComboBox9_Change() > > Dim dtmStart As Date > Dim dtmEnd As Date > > If Day(CDate(TextBox1.Text)) > 12 Then > dtmStart = CDate(TextBox1.Text) > Else > dtmStart = DateSerial(Year(CDate(TextBox1.Text)), > Day(CDate(TextBox1.Text)), Month(CDate(TextBox1.Text))) > End If > > If Day(CDate(TextBox2.Text)) > 12 Then > dtmEnd = CDate(TextBox2.Text) > Else > dtmEnd = DateSerial(Year(CDate(TextBox2.Text)), > Day(CDate(TextBox2.Text)), Month(CDate(TextBox2.Text))) > End If > > TextBox17.Text = DateDiff("m", dtmStart, dtmEnd) > TextBox3.Text = (TextBox13.Text + Val(ComboBox9.Text)) * TextBox17.Text > > End Sub > > > Private Sub UserForm_Initialize() > > ComboBox9.List = Array("1800", "1900", "2400", "2800", "4200", "4600", > "4800", "5400", "6600", "7600", "8700", "8900", "10000") > > End Sub > > Regards, > Sam Mathai Chacko (GL) > > > On Thu, Sep 15, 2011 at 9:06 PM, Shankar Bheema <shankar.n...@gmail.com>wrote: > >> cant we change it for indian format ? >> >> >> On Thu, Sep 15, 2011 at 8:43 PM, NOORAIN ANSARI <noorain.ans...@gmail.com >> > wrote: >> >>> Dear Bheema, >>> >>> >>> Please try it..........and see attached sheet.. >>> ** >>> *Private Sub TextBox2_Exit(ByVal Cancel As MSForms.ReturnBoolean) >>> TextBox17.Text = VBA.DatePart("m", CDate(TextBox2.Text)) - >>> VBA.DatePart("m", CDate(TextBox1.Text)) >>> End Sub >>> * >>> -- >>> Thanks & regards, >>> Noorain Ansari >>> >>> *http://excelmacroworld.blogspot.com/*<http://excelmacroworld.blogspot.com/> >>> *http://noorain-ansari.blogspot.com/*<http://noorain-ansari.blogspot.com/> >>> >>> On Thu, Sep 15, 2011 at 7:25 PM, Shankar Bheema >>> <shankar.n...@gmail.com>wrote: >>> >>>> hai all, >>>> >>>> I am attaching my excel sheet userform. I am getting wrong result of >>>> months in different way. >>>> for example : >>>> Actual months difference between 01-02-2011 and 30-06-2011 are 5 months >>>> but the result coming as 4 >>>> >>>> pls provide solution >>>> >>>> -- >>>> >>>> ---------------------------------------------------------------------------------- >>>> Some important links for excel users: >>>> 1. Follow us on TWITTER for tips tricks and links : >>>> http://twitter.com/exceldailytip >>>> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 >>>> 3. Excel tutorials at http://www.excel-macros.blogspot.com >>>> 4. Learn VBA Macros at http://www.quickvba.blogspot.com >>>> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com >>>> >>>> To post to this group, send email to excel-macros@googlegroups.com >>>> >>>> <><><><><><><><><><><><><><><><><><><><><><> >>>> Like our page on facebook , Just follow below link >>>> http://www.facebook.com/discussexcel >>>> >>> >>> >>> >>> >>> -- >>> >>> ---------------------------------------------------------------------------------- >>> Some important links for excel users: >>> 1. Follow us on TWITTER for tips tricks and links : >>> http://twitter.com/exceldailytip >>> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 >>> 3. Excel tutorials at http://www.excel-macros.blogspot.com >>> 4. Learn VBA Macros at http://www.quickvba.blogspot.com >>> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com >>> >>> To post to this group, send email to excel-macros@googlegroups.com >>> >>> <><><><><><><><><><><><><><><><><><><><><><> >>> Like our page on facebook , Just follow below link >>> http://www.facebook.com/discussexcel >>> >> >> -- >> >> ---------------------------------------------------------------------------------- >> Some important links for excel users: >> 1. Follow us on TWITTER for tips tricks and links : >> http://twitter.com/exceldailytip >> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 >> 3. Excel tutorials at http://www.excel-macros.blogspot.com >> 4. Learn VBA Macros at http://www.quickvba.blogspot.com >> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com >> >> To post to this group, send email to excel-macros@googlegroups.com >> >> <><><><><><><><><><><><><><><><><><><><><><> >> Like our page on facebook , Just follow below link >> http://www.facebook.com/discussexcel >> > > > > -- > Sam Mathai Chacko > > -- > > ---------------------------------------------------------------------------------- > Some important links for excel users: > 1. Follow us on TWITTER for tips tricks and links : > http://twitter.com/exceldailytip > 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 > 3. Excel tutorials at http://www.excel-macros.blogspot.com > 4. Learn VBA Macros at http://www.quickvba.blogspot.com > 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com > > To post to this group, send email to excel-macros@googlegroups.com > > <><><><><><><><><><><><><><><><><><><><><><> > Like our page on facebook , Just follow below link > http://www.facebook.com/discussexcel > -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel