vba - Excel date formatting error -


i'm doing work on done excel program, i'm rusty in area or never had done in part, i'm new in vba please don't judge me if it's simple mistake or error links in description.

so have problem if put confirmation option, example: in 1 cell press "1" in product have, , in cell write "s" if have product , puts date of today in cell.

the problem when delete info inserted, , reenter date deformats becoming smaller , location on cell changes too.

i'm going put links because, said i'm rusty , can't find code of date comes.

http://www.docdroid.net/12dh4/master-atual-20155.xls.html -->this 1 excel

http://www.docdroid.net/12dhj/errorphotos.pdf.html --> photos showing error

this code of 1 of sheets other ones same, if guys see photos understand error itself.


private sub worksheet_change(byval target range) dim rng1 range set rng1 = intersect(range("v3:v500"), target) if rng1 nothing exit sub  application.enableevents = false   on error resume next       if rng1.value <> ""         rng1.offset(0, 2).value = now()     else         rng1.offset(0, 2).clear     end if  application.enableevents = true  end sub 


code triggered when changes @ column v. may find code in worksheet itself:
worksheet code
it clear date if column v contains no value.
way, date not getting smaller show date of today in different format. may check date format right click cell , choose format cells... option @ it.


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Magento/PHP - Get phones on all members in a customer group -

session - Logging Out Using PHP -