THANK YOU SO MUCH SAM.
On Fri, Sep 16, 2011 at 6:50 AM, Sam Mathai Chacko 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.
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))
cant we change it for indian format ?
On Thu, Sep 15, 2011 at 8:43 PM, NOORAIN ANSARI 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)) -
>
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://excelmacrowo
On 15/09/2011, Sam Mathai Chacko wrote:
> Shankar,
>
> The problem with date conversions of text formats to date formats in visual
> basic 6 and VBA is that by default, it considers date as mm/dd/, and not
> like the Indian version dd/mm/. In your case, 01-02-2011 is converted or
> seen as
Shankar,
The problem with date conversions of text formats to date formats in visual
basic 6 and VBA is that by default, it considers date as mm/dd/, and not
like the Indian version dd/mm/. In your case, 01-02-2011 is converted or
seen as 2nd January 2011. To avoid this, use dd-mmm- fo
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
--
-