Date - time - number - problem


Posted by Wim on May 23, 2001 3:27 AM

We use the VBA-statement OPEN in order to open a TXT-file using the semicolon as a delimiter.
When we use Excel 97, there are no problems, when we use Excel 2000 we have conversion-problems with date, time and the number-format.

We, in Belgium, write our date in the format dd/mm/yy. After this statement, it is mm/dd/yy.
The number format is written as a string when the decimal separator ',' is involved.

(when we open the TXT-file manually, there's no problem)

Help us please!!

Posted by Dave Hawley on May 23, 2001 3:37 AM

Hi Wim

Try the DateSerial function or DateValue. eg;

Dim dDate As Date
dDate = "12/22/2001"
dDate = DateSerial(Year(dDate), Month(dDate), Day(dDate))
MsgBox dDate

OR

Dim dDate As Date
dDate = Format(DateValue("12/22/2001"), "dd/mm/yy")
MsgBox dDate

Dave


OzGrid Business Applications

Posted by jonathan on May 23, 2001 5:07 AM

Dave Hawley

I was unable to access the 'post message page', so had to do it this way.

How can I remove an unwanted office toolbar that keeps appearing on the right side of my screen no matter what program I am running. This began after I installed a printer!

appreciate any help.

jonathan


Posted by Dave Hawley on May 23, 2001 5:25 AM

Re: Dave Hawley

You will need to find out the name of the Toolbar or better yet, which application it is from ?

When you get the name of it try substituting it in one of the codes below:

Private Sub Workbook_Open()
Application.CommandBars("Standard").Visible = False
End Sub

Private Sub Workbook_Open()
Application.CommandBars("Standard").Enabled = False
End Sub


But before you do that try the below. Close out of Excel and go to Start>Run and type in:

Excel /s

There is a space after Excel.

This forces Excel to bypass all files in the <Windows
Dir>\Application Data\Microsoft\Xlstart folder or ttalternate startup file location. It also forces Excelto bypass the toolbar file (Excel.xlb or <username>.xlb). You will see "Safe Mode" in the
Excel title bar. Use this switch when you want to
start Excel in safe mode.


Failing this I would suggest running scan disks then go to the site of your printer and make sure the Printer Driver is up to date. If not you will be able to download one for free.


Dave
OzGrid Business Applications



Posted by jonathan on May 23, 2001 8:55 AM

Re: Dave Hawley

Thank you Dave. I was unable to delete the toolbar, so I did the next best thing: removed it from the startup menu.

For all intents and purposes that seems to do the trick.