Re: Problem with Doevents

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance





You keep referring to your form as "Userform1." Is that a naming convention you use or is this VBA code? VBA calls forms Userforms and a quick check just revealed that neither the Userform nor the label control has a .Refresh method. Also, the ProgressBar control (Version 5 SP2) doesn't have a .Refresh method either, although Version 6 SP4 does. All of that info is from Excel 97 so it's quite dated and possibly no longer accurate, but it does seem to mirror what you're seeing, which is why I ask if it's *really* VB6 code and not VBA.

RW

Firstly, Userform1 is just a name I gave to the form.
Secondly, I originally used this progress bar form in VBA (I obtained it from another website) and, after some modifications, it worked perfectly. I then saved the form as Userform1.frm and added this as a form to my VB6 program - it got added under "Designers" not "Forms".


I can access the object and code in VB6 for Userform1 as for a Form and it all looks ok.

The Frameprogress and Labelprogres are just names I gave to a frame and label in the form.

So although the original Userform1 was set up in VBA, I copied it to VB6. I guess that frames and labels must be somewhat different in VBA and VB6 or that a "Designers" are somewhat different from Forms.

I suppose the easy way out is to start from scratch and build the equivalent of Userform1 as a Form in VB6 when the Refresh method should be available.

Chris
.



Relevant Pages

  • Re: Userform, ComboBox and Outside data...
    ... the label on your form to a particular text file. ... for my work and it's an "information from Userform1 leads into Userform2... ... Is it possible to populate a ComboBox with items from an outside text file ... Trains was the option selected so the caption for a label on ...
    (microsoft.public.excel.programming)
  • Re: Label und Textbox trennen
    ... > Wie kann ich per VBA ein Label von einer Textbox trennen? ... > Wenn ich eine Textbox in ein Formular ziehe, ... Nun hat dieses Label aber keine Events. ... Nacher werde ich per VBA ...
    (microsoft.public.de.access)
  • Re: Using VBA to send Windows Popup message...
    ... you could add an UserForm to the receptionists Outlook VBA project and ... Private Sub Items_ItemAdd ... Dim fm as UserForm1 ...
    (microsoft.public.outlook.program_vba)
  • Re: Command Button
    ... >>That should have opened VBA and you should see something ... >>Private Sub Label16_MouseDown(Button As Integer, ... >>Scroll through the list and find the name of the label, ... >>>>color) with Raised special effect. ...
    (microsoft.public.access.formscoding)
  • Re: scratching my head
    ... labels are for displaying "static" information. ... suggestions in VBA, post a followup question here.There's a high probability ... > command button and label on the form. ... > button which displays the results in the label. ...
    (microsoft.public.access.modulesdaovba)