Board index » Visual Studio » Time function in vb 6.0 suddenly stopped working

Time function in vb 6.0 suddenly stopped working

Visual Studio2
My company has a dispatching program written in vb 6.0 sp6 with about 10

supporting dll's. Last Saturday, I made a minor code change, recompiled and

distributed the new executable. Now the Time function does not work. It does

not work on any of the workstations with the new version and it does not work

on my development computer, for just that 1 program. If I start a new VB

project then it will work. When I debug the dispatch program and type "?

Time" in the command window, it just brings back an empty string. The Now()

function works just fine, and I am unaware of any other functions having

problems. Any ideas about what may have happened? I have double checked all

of my references and tried recompiling numerous times without success.


-
 

Re:Time function in vb 6.0 suddenly stopped working

What changes did you make to the application?



Details please!



Saga



"Mkjo" <Mkjo@discussions.microsoft.com>wrote in message

Quote
My company has a dispatching program written in vb 6.0 sp6 with about 10

supporting dll's. Last Saturday, I made a minor code change, recompiled and

distributed the new executable. Now the Time function does not work. It does

not work on any of the workstations with the new version and it does not work

on my development computer, for just that 1 program. If I start a new VB

project then it will work. When I debug the dispatch program and type "?

Time" in the command window, it just brings back an empty string. The Now()

function works just fine, and I am unaware of any other functions having

problems. Any ideas about what may have happened? I have double checked all

of my references and tried recompiling numerous times without success.





-

Re:Time function in vb 6.0 suddenly stopped working

A report that is called was placed on a different server and the path was

hard coded into the program. I just went in and changed it to point to the

new location.







"Saga" wrote:



Quote
What changes did you make to the application?



Details please!



Saga



"Mkjo" <Mkjo@discussions.microsoft.com>wrote in message

news:E90E71B0-6642-46F3-B975-152624D16643@microsoft.com...

>My company has a dispatching program written in vb 6.0 sp6 with about 10

>supporting dll's. Last Saturday, I made a minor code change, recompiled and

>distributed the new executable. Now the Time function does not work. It does

>not work on any of the workstations with the new version and it does not work

>on my development computer, for just that 1 program. If I start a new VB

>project then it will work. When I debug the dispatch program and type "?

>Time" in the command window, it just brings back an empty string. The Now()

>function works just fine, and I am unaware of any other functions having

>problems. Any ideas about what may have happened? I have double checked all

>of my references and tried recompiling numerous times without success.







-

Re:Time function in vb 6.0 suddenly stopped working

If you were working for me you would be fired in no time!!!!

You even do not know how to present the problem you created it in the first

place!!!!

Jack



"Mkjo" <Mkjo@discussions.microsoft.com>wrote in message

Quote
My company has a dispatching program written in vb 6.0 sp6 with about 10

supporting dll's. Last Saturday, I made a minor code change, recompiled

and

distributed the new executable. Now the Time function does not work. It

does

not work on any of the workstations with the new version and it does not

work

on my development computer, for just that 1 program. If I start a new VB

project then it will work. When I debug the dispatch program and type "?

Time" in the command window, it just brings back an empty string. The

Now()

function works just fine, and I am unaware of any other functions having

problems. Any ideas about what may have happened? I have double checked

all

of my references and tried recompiling numerous times without success.





-

Re:Time function in vb 6.0 suddenly stopped working

Quote
My company has a dispatching program written in vb 6.0 sp6 with about 10

supporting dll's. Last Saturday, I made a minor code change, recompiled

and

distributed the new executable. Now the Time function does not work. It

does

not work on any of the workstations with the new version and it does not

work

on my development computer, for just that 1 program. If I start a new VB

project then it will work. When I debug the dispatch program and type "?

Time" in the command window, it just brings back an empty string. The

Now()

function works just fine, and I am unaware of any other functions having

problems. Any ideas about what may have happened? I have double checked

all

of my references and tried recompiling numerous times without success.



It sounds like you may have broken a Reference. Go to Project/References in

VB's menu and look to see if any unchecked ones are listed as MISSING. If

so, check the box. Worse comes to worse, you could use vba.Time in place of

Time in your code and that would probably force it to work, but it is better

to correct the underlying problem instead.



Rick



-

Re:Time function in vb 6.0 suddenly stopped working

Just what is it you do not understand about the problem? The Time function is

a built in VB function. It used to work. Now it does not. Any code that I

edit in the program should not affect this function. I opened the program,

changed a hard coded string value and recompiled. And now the function does

not work.



Maybe you should try using your brain and thinking a little before talking

like a lunatic. You don't sound like someone who works very well with others.



"Jack" wrote:



Quote
If you were working for me you would be fired in no time!!!!

You even do not know how to present the problem you created it in the first

place!!!!

Jack



"Mkjo" <Mkjo@discussions.microsoft.com>wrote in message

news:E90E71B0-6642-46F3-B975-152624D16643@microsoft.com...

>My company has a dispatching program written in vb 6.0 sp6 with about 10

>supporting dll's. Last Saturday, I made a minor code change, recompiled

>and

>distributed the new executable. Now the Time function does not work. It

>does

>not work on any of the workstations with the new version and it does not

>work

>on my development computer, for just that 1 program. If I start a new VB

>project then it will work. When I debug the dispatch program and type "?

>Time" in the command window, it just brings back an empty string. The

>Now()

>function works just fine, and I am unaware of any other functions having

>problems. Any ideas about what may have happened? I have double checked

>all

>of my references and tried recompiling numerous times without success.







-

Re:Time function in vb 6.0 suddenly stopped working



"Mkjo" <Mkjo@discussions.microsoft.com>schrieb im Newsbeitrag



Quote
A report that is called was placed on a different server

and the path was hard coded into the program.

I just went in and changed it to point to the

new location.

My guess would be, that you somehow have overwritten

VBAs Time-Function with another, similar named function.

Try to search your project for the string 'Time' (even

in the VB-Object-Explorer - maybe there's a Public

Method in a Component with the same Method-name.



If you don't find any other Definition for 'Time' in your project,

then you could try, to replace all occurences of your normal

Time-Function-usage with 'VBA.Time' - but that would be

only a workaround, wich ignores the real cause.



Olaf





-

Re:Time function in vb 6.0 suddenly stopped working

I believe it is the file path causing the problem, and I think the time is

the file access/create/modfiy time. Make sure your path is correct (inside

the vb program, use debug), and your app has the right to read/write from

the new location.

Unless you are junior-junior-junior-junior-junior application developer,

your skills are a little below the bar.

--

cheers,

RL

"Schmidt" <sss@online.de>wrote in message

Quote


"Mkjo" <Mkjo@discussions.microsoft.com>schrieb im Newsbeitrag

news:DD5582DA-46CB-4CD0-AC5F-2B438C04203A@microsoft.com...



>A report that is called was placed on a different server

>and the path was hard coded into the program.

>I just went in and changed it to point to the

>new location.

My guess would be, that you somehow have overwritten

VBAs Time-Function with another, similar named function.

Try to search your project for the string 'Time' (even

in the VB-Object-Explorer - maybe there's a Public

Method in a Component with the same Method-name.



If you don't find any other Definition for 'Time' in your project,

then you could try, to replace all occurences of your normal

Time-Function-usage with 'VBA.Time' - but that would be

only a workaround, wich ignores the real cause.



Olaf









-

Re:Time function in vb 6.0 suddenly stopped working

You nailed it. I used the object browser and found a class in a supporing dll

that had been added to the project. It had a public variable in it called

Time. I renamed the variable and now it works. That class had been added a

while back but did not cause any problems until this latest compile.



Thanks for the great tip.



"Schmidt" wrote:



Quote


"Mkjo" <Mkjo@discussions.microsoft.com>schrieb im Newsbeitrag

news:DD5582DA-46CB-4CD0-AC5F-2B438C04203A@microsoft.com...



>A report that is called was placed on a different server

>and the path was hard coded into the program.

>I just went in and changed it to point to the

>new location.

My guess would be, that you somehow have overwritten

VBAs Time-Function with another, similar named function.

Try to search your project for the string 'Time' (even

in the VB-Object-Explorer - maybe there's a Public

Method in a Component with the same Method-name.



If you don't find any other Definition for 'Time' in your project,

then you could try, to replace all occurences of your normal

Time-Function-usage with 'VBA.Time' - but that would be

only a workaround, wich ignores the real cause.



Olaf







-

Re:Time function in vb 6.0 suddenly stopped working

Egghead <robertlo@NO_SHAW.CA>wrote:

Quote
Unless you are junior-junior-junior-junior-junior application developer,

your skills are a little below the bar.



Wow. A little self-reflection, perhaps?

--

.NET: It's About Trust!

vfred.mvps.org">vfred.mvps.org





-

Re:Time function in vb 6.0 suddenly stopped working

This was my first post in msdn and I cannot believe the assinine reply's I

have received already. You call me a junior programmer and yet you throw out

a ridiculous idea like that. I would challenge you to show me a piece of code

that will do what you are suggesting. Is someone actually paying you nutjobs

money to write code for them?





"Egghead" wrote:



Quote
I believe it is the file path causing the problem, and I think the time is

the file access/create/modfiy time. Make sure your path is correct (inside

the vb program, use debug), and your app has the right to read/write from

the new location.

Unless you are junior-junior-junior-junior-junior application developer,

your skills are a little below the bar.

--

cheers,

RL

"Schmidt" <sss@online.de>wrote in message

news:OGbKK6NuHHA.1212@TK2MSFTNGP05.phx.gbl...

>

>"Mkjo" <Mkjo@discussions.microsoft.com>schrieb im Newsbeitrag

>news:DD5582DA-46CB-4CD0-AC5F-2B438C04203A@microsoft.com...

>

>>A report that is called was placed on a different server

>>and the path was hard coded into the program.

>>I just went in and changed it to point to the

>>new location.

>My guess would be, that you somehow have overwritten

>VBAs Time-Function with another, similar named function.

>Try to search your project for the string 'Time' (even

>in the VB-Object-Explorer - maybe there's a Public

>Method in a Component with the same Method-name.

>

>If you don't find any other Definition for 'Time' in your project,

>then you could try, to replace all occurences of your normal

>Time-Function-usage with 'VBA.Time' - but that would be

>only a workaround, wich ignores the real cause.

>

>Olaf

>

>







-

Re:Time function in vb 6.0 suddenly stopped working

Mkjo <Mkjo@discussions.microsoft.com>wrote:

Quote
This was my first post in msdn



Actually, you're posting to public newsgroups (see groups.google.com),">groups.google.com),

despite the pretty wallpaper Microsoft tries to cover that up with. And as such:



Quote
and I cannot believe the assinine reply's I have received already.



Welcome to the real world! :-)



Quote
You call me a junior programmer and yet you throw out

a ridiculous idea like that.



S/he was actually calling Olaf that, this time. And that alone cements your

conclusion:



Quote
Is someone actually paying you nutjobs

money to write code for them?



Nutjob all the way. Good call.

--

.NET: It's About Trust!

vfred.mvps.org">vfred.mvps.org





-

Re:Time function in vb 6.0 suddenly stopped working

"Mkjo" <Mkjo@discussions.microsoft.com>wrote in message

Quote
You nailed it. I used the object browser and found a class in a supporing

dll

that had been added to the project. It had a public variable in it called

Time. I renamed the variable and now it works. That class had been added a

while back but did not cause any problems until this latest compile.



Thanks for the great tip.



Score one *against* using GlobalMultiuse



--

Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..

In Loving Memory - www.vbsight.com/Remembrance.htm">www.vbsight.com/Remembrance.htm





-

Re:Time function in vb 6.0 suddenly stopped working

"Mkjo" <Mkjo@discussions.microsoft.com>wrote in message



Quote
You nailed it. I used the object browser and found a class in a

supporing dll that had been added to the project. It had a public

variable in it called Time. I renamed the variable and now it works.



As you will have by now realised, you completely misjudged the situation and

you ended up shouting at EggHead for something you believe he said about you

when in fact he was talking to Olaf Schmitt at the time. Mind you, I quite

like the fact that you reprimanded Egghead because he should not himself

have been shouting down Olaf Schmidt (who, along with some others here, came

up with the correct solution for you) and also because EggHead has shown

himself to be stupid and nasty and, incidentally, totally wrong, and he is

therefore fully worthy of your contempt.



In any case, as you have recently discovered, this is usually a very good

place to come to when you have a problem. You just need to have a bit of a

thick skin ;-)



Welcome to the group ;-)



Mike





-

Re:Time function in vb 6.0 suddenly stopped working



"Mkjo" <Mkjo@discussions.microsoft.com>schrieb im Newsbeitrag



Quote
That class had been added a while back but did not

cause any problems until this latest compile.

Such "timebombs" come up from time to time, if the order of

references in your project changes - read Ricks reply again.



Olaf





-

Re:Time function in vb 6.0 suddenly stopped working



"Mkjo" <Mkjo@discussions.microsoft.com>schrieb im Newsbeitrag



Quote
This was my first post in msdn and I cannot believe

the assinine reply's I have received already.

The rate of "asinine replys" is normally not as high here in the

group - you simply had bad luck today I would gess. ;-)



Quote
You call me a junior programmer...

Heh, that was me, he was calling so ... good feeling ...

at least 15 years, simply blown away by eggheads grace.

<g>



Olaf





-

Re:Time function in vb 6.0 suddenly stopped working

Hi here,



Without knowing your programming style, I am guessing your path string is

wrong. It is because I think you have a variable name Time which you do

something with the code, not the time function at all.



Do you test your app at all?



--

cheers,

RL

"Karl E. Peterson" <karl@mvps.org>wrote in message

Quote
Mkjo <Mkjo@discussions.microsoft.com>wrote:

>This was my first post in msdn



Actually, you're posting to public newsgroups (see

groups.google.com),">groups.google.com), despite the pretty wallpaper Microsoft tries to

cover that up with. And as such:



>and I cannot believe the assinine reply's I have received already.



Welcome to the real world! :-)



>You call me a junior programmer and yet you throw out

>a ridiculous idea like that.



S/he was actually calling Olaf that, this time. And that alone cements

your conclusion:



>Is someone actually paying you nutjobs

>money to write code for them?



Nutjob all the way. Good call.

--

.NET: It's About Trust!

vfred.mvps.org">vfred.mvps.org







-

Re:Time function in vb 6.0 suddenly stopped working

Yo Egghead! Do you grok the concept of *threaded* newsreaders???

--

.NET: It's About Trust!

vfred.mvps.org">vfred.mvps.org





Egghead <robertlo@NO_SHAW.CA>wrote:

Quote
Hi here,



Without knowing your programming style, I am guessing your path string is

wrong. It is because I think you have a variable name Time which you do

something with the code, not the time function at all.



Do you test your app at all?



>Mkjo <Mkjo@discussions.microsoft.com>wrote:

>>This was my first post in msdn

>

>Actually, you're posting to public newsgroups (see

>groups.google.com),">groups.google.com), despite the pretty wallpaper Microsoft tries to

>cover that up with. And as such:

>

>>and I cannot believe the assinine reply's I have received already.

>

>Welcome to the real world! :-)

>

>>You call me a junior programmer and yet you throw out

>>a ridiculous idea like that.

>

>S/he was actually calling Olaf that, this time. And that alone cements

>your conclusion:

>

>>Is someone actually paying you nutjobs

>>money to write code for them?

>

>Nutjob all the way. Good call.

>--

>.NET: It's About Trust!

>vfred.mvps.org">vfred.mvps.org







-

Re:Time function in vb 6.0 suddenly stopped working

I probably should just ignore these guys, but I wasn't expecting people like

that to be posting here.



But in fairness to the group, I have never recieved such quick and usefull

replies in response to my posts for help before. I am 1 of 2 programmers at

our company and when we have issues, we have very few resources to turn to

for help.



So I guess I will have to take the good with the bad.



Again, thanks for the help.



"Schmidt" wrote:



Quote


"Mkjo" <Mkjo@discussions.microsoft.com>schrieb im Newsbeitrag

news:41ED76E1-D0D7-4065-BD02-81A7586D7437@microsoft.com...



>This was my first post in msdn and I cannot believe

>the assinine reply's I have received already.

The rate of "asinine replys" is normally not as high here in the

group - you simply had bad luck today I would gess. ;-)



>You call me a junior programmer...

Heh, that was me, he was calling so ... good feeling ...

at least 15 years, simply blown away by eggheads grace.

<g>



Olaf







-

Re:Time function in vb 6.0 suddenly stopped working

"Egghead" <robertlo@NO_SHAW.CA>wrote in message



Quote
Without knowing your programming style, I am guessing your

path string is wrong. It is because I think you have a variable

name Time which you do something with the code, not the time

function at all.



Stop squirming, Egghead. You're just digging a deeper hole for yourself than

you're already in. You were totally WRONG when you posted your own initial

response, and you were totally WRONG when you berated Olaf Schmidt,

especially since it turns out that Olaf was one of the people who posted the

RIGHT answer! And now, hours after reading the correct solution posted by

others, and one hour after the original poster, Mkjo, has offically

confirmed on the group that those answers were indeed correct, you have

decided to attempt a quick about turn, pretending that you know the correct

answer when you really did not know it at all! We can all see that you have

had at least two hours to read the various correct answers, and at least one

full hour to read Mkjo's response in which he confirmed Olaf's solution as

being the correct one, and yet you are pretending that you have not read

that message at all and that you have not even read all the other earlier

messages in which the correct solution was posted, and you are pretending

that you came up with the answer yourself, totally independently. We all

know that you're lying, Egghead, and we all know that you are squirming

about in the hole that you have dug for yourself. You're an idiot, Egghead,

a stupid idiot, and you are apparently also a crap programmer!



Mike







-

Re:Time function in vb 6.0 suddenly stopped working

In article <5056F27F-29BD-4319-91EC-7EFCE05B2109@microsoft.com>,

Mkjo@discussions.microsoft.com says...

Quote
I probably should just ignore these guys, but I wasn't expecting people like

that to be posting here.



They are everywhere, in greater or lesser numbers. Some groups have few

of them, some have lots, but there are always some.



Quote


But in fairness to the group, I have never recieved such quick and usefull

replies in response to my posts for help before. I am 1 of 2 programmers at

our company and when we have issues, we have very few resources to turn to

for help.



Yes, it's a very knowledgable group; just a bit opinionated and

idiosyncratic at times.



....



--

Remove the ns_ from if replying by e-mail (but keep posts in the

newsgroups if possible).

-

Re:Time function in vb 6.0 suddenly stopped working



"David Kerber" <ns_dkerber@ns_WarrenRogersAssociates.com>wrote in message

Quote
In article <5056F27F-29BD-4319-91EC-7EFCE05B2109@microsoft.com>,

Mkjo@discussions.microsoft.com says...

>I probably should just ignore these guys, but I wasn't expecting people

like

>that to be posting here.



They are everywhere, in greater or lesser numbers. Some groups have few

of them, some have lots, but there are always some.



>

>But in fairness to the group, I have never recieved such quick and

usefull

>replies in response to my posts for help before. I am 1 of 2 programmers

at

>our company and when we have issues, we have very few resources to turn

to

>for help.



Yes, it's a very knowledgable group; just a bit opinionated and

idiosyncratic at times.





I know exactly what you mean.



In my opinion the other people around here are a bit peculiar.



-ralph

<g>





-

Re:Time function in vb 6.0 suddenly stopped working

Apparently Jack doesn't know "Jack". :o



"Mkjo" wrote:



Quote
Just what is it you do not understand about the problem? The Time function is

a built in VB function. It used to work. Now it does not. Any code that I

edit in the program should not affect this function. I opened the program,

changed a hard coded string value and recompiled. And now the function does

not work.



Maybe you should try using your brain and thinking a little before talking

like a lunatic. You don't sound like someone who works very well with others.



"Jack" wrote:



>If you were working for me you would be fired in no time!!!!

>You even do not know how to present the problem you created it in the first

>place!!!!

>Jack

>

>"Mkjo" <Mkjo@discussions.microsoft.com>wrote in message

>news:E90E71B0-6642-46F3-B975-152624D16643@microsoft.com...

>>My company has a dispatching program written in vb 6.0 sp6 with about 10

>>supporting dll's. Last Saturday, I made a minor code change, recompiled

>>and

>>distributed the new executable. Now the Time function does not work. It

>>does

>>not work on any of the workstations with the new version and it does not

>>work

>>on my development computer, for just that 1 program. If I start a new VB

>>project then it will work. When I debug the dispatch program and type "?

>>Time" in the command window, it just brings back an empty string. The

>>Now()

>>function works just fine, and I am unaware of any other functions having

>>problems. Any ideas about what may have happened? I have double checked

>>all

>>of my references and tried recompiling numerous times without success.

>

>

>

-