Hi experts,
Could you pls help to write a excel vba macro to capture Data of Current Date in dd/mm/yyyy, even though my system date format is in different one. I am using excel/office 2007.
Thanks in advance,
Hi experts,
Could you pls help to write a excel vba macro to capture Data of Current Date in dd/mm/yyyy, even though my system date format is in different one. I am using excel/office 2007.
Thanks in advance,
hi vijay21, you can record the following actions. assuming your dates are in column A, select the whole column
go to Data -> Text to Columns -> Next -> Next -> Date: MDY - > Finish
it will look something like this:
![]()
Please Login or Register to view this content.
Thanks, if you have clicked on the * and added our rep.
If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".
"Contentment is not the fulfillment of what you want, but the realization of what you already have."
Tips & Tutorials I Compiled | How to Get Quick & Good Answers
I think I did not explain fully on my req. I am trying to capture the Entry Date in a excel cell thru an userform. I have done coding to get the current date in a variable. It works fine when the date is in brit format (dd/mm/yyyy). I wish to keep the same format of date even though my system format is changed to usa format (mm/dd/yyyy).
Thanks,
I think VBA does that for you (but i'm no VBA expert).
Otherwise post an excel file,without confidentional information.
Please also add the desired result.
Notice my main language is not English.
I appreciate it, if you reply on my solution.
If you are satisfied with the solution, please mark the question solved.
You can add reputation by clicking on the star * add reputation.
Thanks for your reply.
I am looking to write a VBA code inside the macro. Could any one help me.
In that case, you don't read my suggest in #2 well enough.
Hi, vijay21,
the long for a date in Format dd/mm/yyyy should be equal to that of mm/dd/yyyy as long as Excel recognises the input as a Date. So maybe use the CLng-conversion for your search or apply the Autofilter (which in VBA would need a long value for putting up any result).
Ciao,
Holger
Use Code-Tags for showing your code: [code] Your Code here [/code]
Please mark your question Solved if there has been offered a solution that works fine for you
hi,
I got an idea to store the date using NumberFormat in VBA macro.
I will try it to check ! Hope this works..... thanks for your guidence Holger.![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks