View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\)[_1975_] Rick Rothstein \(MVP - VB\)[_1975_] is offline
external usenet poster
 
Posts: 1
Default Textbox problem in Userform

When you ask questions about code you have written that is not working the
way you want, it is usually a good idea to post your code so we can see what
you are doing and, hopefully, spot how to correct the problem. Otherwise,
all we can do is to guess at a possible solution. My guess is to assign
this...

CDate("01-" & Replace(txtDate, "-", "-20"))

back to your Range or Cell reference. What it does is fill out the year to
four digits so the 08 is never confused as a day value, add the 01 day value
and concatenate it into a form that CDate can process, thus producing a date
that can be sent back to the worksheet.

Rick



wrote in message
...
Hi,

I have a userform, with "TxtMonth" (for the MM/YY entry) and one OK
button.

I want to enter the JAN-08 in the textMonth and I want to see
the result in the sheet when I press Ok button.

I made the procedure for it, but it is showing 18-Jan-08 in the sheet,
which is wrong. I want to see 01/01/08 in the worksheet.

because I made the advance filter procedure it is detecting 01/01/08
when I type the JAN-08 in A2 cell in the worksheet, then it is
filtering by month.

pls send me the solution, if you have

Thanks in advance.

Syed Shahzad