I was in difficulties to run the progress information of cZipArchive class and after some search, I noticed that "Timer" has a wrong value.
If I set a simple code :
Private Sub CommandButton_click()
MsgBox Timer
End Sub
It displays "False" instead of a value if I do the same on main form or some other forms.
Created a simple Form1 with also the same button and it's ok.
I searched for difference bewteen a form where MsgBox timer gives False and Form1 where MsgBox Timer gives a number value but I don't see
Both forms are called with the same method (Form1.Show).
Has someone already saw that problem ?
Thanks
Last edited by Couin; Dec 2nd, 2022 at 11:21 AM.
1 Hour vinyl mix live onEurodance90each sunday 10:00 PM (French Timezone) - New non-official Jingle Palette update Jingle Palette Reloaded
post all the code of your form that is giving you your issue
Hi, like I was saying to Arnoutdv, even without anycode on this form, the problem is here.
@Arnoutdv : I get the same result The problem is that on some form, MsgBox Timer gives "False", and on others, it gives the timer value.
I "resolved" the problem for this form, by copy/paste its controls (2 labels, one button) on the new "Form1" that has no problem, and delete the old form, rename the new. The problem gone. But I don't know what it was.
I have to do the same with the form where I discovered the problem.
Edit : Tryng to apply the workaround on another form where the is also the problem, the problem still there ...
Last edited by Couin; Dec 2nd, 2022 at 11:21 AM.
1 Hour vinyl mix live onEurodance90each sunday 10:00 PM (French Timezone) - New non-official Jingle Palette update Jingle Palette Reloaded
Open the contents of the "broken" form's .frm file in Notepad to capture all the code and "behind the scenes" configuration, and post the contents here. Or, you can just search the .frm file from Notepad for "Timer", and you will almost certainly find the problem.
Use VBA.Timer instead of just Timer, and I bet your problem is solved. Like others have said, you've got some other object (or function) named Timer.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
Looks nothing found called "Timer" in the project.
Sorry, I don't understand the "Code Window Timer. (Timer with a period after it)", what do you mean ?
Thanks
In the code window, in your Command1_Click procedure, start a new line and type Timer. (Timer with a period after it) and see what, if anything, Intellisense displays in the completion window. That should shed light on what it thinks "Timer" "Is".
Did you even try VBA.Timer? I'd love to know if you can still get the problem using VBA.Timer, as you didn't show us all possible functions and objects in this project. It doesn't have to be in the form with which you're working.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
Sorry Elroy, I missed to answer, but yes, with VBA.Timer it's ok.
It doesn't explain why Timer is not always ok, but as default case, if I can not resolve, I will uese VBA.Timer
Originally Posted by Wolfgang Enzinger
Right-click on Timer in your code, then choose "Definition". Where does it jump to?
Should be
Property Timer As Single
read-only
Member of VBA.DateTime
Hi, Yes, this is what I get
Originally Posted by OptionBase1
In the code window, in your Command1_Click procedure, start a new line and type Timer. (Timer with a period after it) and see what, if anything, Intellisense displays in the completion window. That should shed light on what it thinks "Timer" "Is".
I tried, I get nothing displayed more than what I type, no suggestion.
1 Hour vinyl mix live onEurodance90each sunday 10:00 PM (French Timezone) - New non-official Jingle Palette update Jingle Palette Reloaded
Jeezes... Immma dork... I thought I was downloading the OP's project... I wan't paying close enough attention and didn't realize it was your project. Thank god it's friday and the weekend is here....
Thank god it's friday and the weekend is here....(tg)
Hee-hee Ain't that the truth...woke up this morning and my iphone was DEAD (new iPhone 14 Plus bought in October). Luckily, a chat agent was able to described a 'soft-reboot' procedure. I followed those instructions and it is working fine now. The point is, as mentioned above by OptionBase (Post #7), please follow instructions --- will help the rest of us in the future assist in solving your problem (this is not just advice for the OP, but for anyone else who posts issues in this forum.)
PS--that quote should be capitalized God and Friday! :-)
Jeezes... Immma dork... I thought I was downloading the OP's project... I wan't paying close enough attention and didn't realize it was your project. Thank god it's friday and the weekend is here....
-tg
Don't feel bad I almost did the same thing, got so far as to start typing a response when I realized it wasn't the OPs project.
You should have uploaded the project where you have this issue. Could have probably saved a bunch of posts.
You said that you had tried typing in Timer and a . after wards which would indicate there was not a control by that name but there could be a variable by that name and you would get nothing after you type the dot. The only way to know is to upload a project that shows the issue and let someone have a look at it. It is likely an easy fix.
Don't see any issue with the form you uploaded, msgbox displays the numeric value one would expect.
If you open that form directly all by itself do you see the issue where the msgbox says false?
If not but you do when you open the project with the form in it then the problem is not in the form could be a module, a reference these would not show up in just a form file. would need to see the actual project where the problem appears. If you have a module as part of the project the problem could be there.
Last edited by DataMiser; Dec 9th, 2022 at 12:11 AM.
I would be very surprise if someone here fing a "Timer" in it, as well as I opened if on another machine with VB6.
Thanks
The next time upload the exact project with the exact form for us to see it and experience the same issue as you allegedly do, and preferably do it in the first post when you ask the question and ask for help.
It seems that the original form with the issue does not exist anymore now, and if it does, post it, because the form that you posted is not having the issue that you described.
That's why it's a mistery because I have the problem with this form and there is not timer inside it and nothing in the project has any reference to a timer in this form
In all case, since I re-created new forms to replace bad ones, I have no longer the problem
1 Hour vinyl mix live onEurodance90each sunday 10:00 PM (French Timezone) - New non-official Jingle Palette update Jingle Palette Reloaded
That's why it's a mistery because I have the problem with this form and there is not timer inside it and nothing in the project has any reference to a timer in this form
In all case, since I re-created new forms to replace bad ones, I have no longer the problem
But you say there is nothing in the project that is a problem, maybe there is you did not upload the project just the form and there is nothing wrong with the form. If you were to just load the form, not the project and run it then you would likely not see any issue either which would mean the issue is else where. If you do then that would indicate that there is a problem with your VB installation.
The important thing to remember is that if you want to get to the bottom of an error you have to make sure that what you post actual shows the error other wise no one can do anything more than guess. The form you posted does not show the error so not much can be done.
I was meaning that in the project, there was nothing called "Timer" as control or programmaticaly create control.
Also, for some reasons, I can not share the whole project.
Probably a bug somewhere, because here is what I did :
Renamed the frame where the problem appears, to "FormHS".
Created a new frame named with the original name of the previous form (so if something in the project was creating a "Timer" on the old form, it should create as well on the new form, as well as the form name is the same).
I keep the thread bookmarked, if it happens on another project, I will comeback to post
Have a nice day
1 Hour vinyl mix live onEurodance90each sunday 10:00 PM (French Timezone) - New non-official Jingle Palette update Jingle Palette Reloaded