Solved

y2k problem

Posted on 2001-06-28
6
155 Views
Last Modified: 2010-05-18
I record a macro in excel2000 My 1st column has data & time as dd/mm/yyyy HH:MM:SS.sss AM/PM.By format cell I format to date.When I do in windows98 the data is converted as ex 29/06/2001.When I do the same in windows95 the data is converted as ex 29/06/1900.Why is this so.In both PC I instaled Office2000.But the OS is windows98 & winwows95.I copy the macro & run it in VB6.
0
Comment
Question by:ns_kishorekumar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 18

Expert Comment

by:deighton
ID: 6237186
You might need to apply a Y2K upgrade to the win 95 O/S
0
 

Author Comment

by:ns_kishorekumar
ID: 6237285
How to apply the update for y2k
Buy the date is displayed as  dd/mm/yyyy ie I am getting 29/06/2001.If I see the regional settings.
0
 
LVL 18

Expert Comment

by:deighton
ID: 6237954
So if you format date

01/15/00 to dd/mm/yyyy it becomes 15/01/1900 in win 95 & 15/01/2000 in the win 98 machine - is that the problem?

Is the date on the win 95 machine correct?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 18

Accepted Solution

by:
deighton earned 50 total points
ID: 6237967
Could you sho9w us the macro?
0
 
LVL 33

Expert Comment

by:hongjun
ID: 6243331
ns_kishorekumar,

Use my below link to test Y2k compatibility.
http://www.freevbcode.com/ShowCode.Asp?ID=627

Then use this to convert your system to Y2k compatible if it is not.
http://www.freevbcode.com/ShowCode.Asp?ID=205

hongjun
0
 

Author Comment

by:ns_kishorekumar
ID: 6243787
here is the macro.
This is a csv file format.My fist column has data & time
I copy the 1st column and insert it as 1st column And make the 1column as data by format cells and the 2nd column is formated to time.
Columns("A:A").Select
Selection.Copy
Selection.Insert Shift:=xlToRight
Application.CutCopyMode = False
Selection.NumberFormat = "dd/mm/yyyy"
Columns("B:B").Select
Selection.NumberFormat = "hh:mm:ss AM/PM"
Range("C:C,E:E,F:F,H:H,I:I,K:K,L:L").Select
Range("L1").Activate
ActiveWindow.SmallScroll ToRight:=11
Range("C:C,E:E,F:F,H:H,I:I,K:K,L:L,N:N,O:O,Q:Q,R:R,T:T,U:U").Select
Range("U1").Activate
ActiveWindow.SmallScroll ToRight:=5
Range("C:C,E:E,F:F,H:H,I:I,K:K,L:L,N:N,O:O,Q:Q,R:R,T:T,U:U,W:W,X:X,Z:Z,AA:AA"). _
Select
Range("AA1").Activate
ActiveWindow.SmallScroll ToRight:=9
Range( _
     "C:C,E:E,F:F,H:H,I:I,K:K,L:L,N:N,O:O,Q:Q,R:R,T:T,U:U,W:W,X:X,Z:Z,AA:AA,AC:AC,AD:AD,AF:AF,AG:AG,AI:AI,AJ:AJ" _
     ).Select
Range("AJ1").Activate
ActiveWindow.SmallScroll ToRight:=2
Selection.Delete Shift:=xlToLeft
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question