I have already done that. What I need is the VBA code to be used when I
encounter a Progress Bar in the VB6 file that I am converting.
Peter
With the form open in design view, select Insert | ActiveX Control from
the menu bar, then scroll through the list of available controls until
you find the entry for the Microsoft ProgressBar control.
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
I am trying to convert a form from VB6 to Access. Because I do not
know the syntax of the VBA equivalent to
Set pb = Forms(FormNo).Controls.Add("MSComctlLib.ProgCtrl.1",
ctlName, True)
then I would have to convert what I can and then add the missing
controls by hand, setting their size and position to the values in the
original VB6 code. Having done this, I would save the form and it
would hopefully not need to be changed again.
Peter
message I'm not sure why you'd want to add the progress bar using VBA. Are
you saying that you're intending to add it each time you need it, and
delete it when you're done? That's a bad idea: there's a lifetime
limit of 754 controls on a form, so if you're constantly adding and
deleting controls, you're eventually reach the limit. Simply put it
on the form and toggle its visibility.
As to the Timer, there's no need for a timer control in Access. Set
the form's TimerInterval, and put the code in its On Timer event.
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
I am persevering with a program to convert a form from VB6 to Access.
The form I am working on has a MSComctlLib.ProgressBar and a
VB.Timer.
I can add the ProgressBar to the form manually and then alter the
parameters, but does anyone know how to add it in VBA please?
As a Timer control is invisible, can I use the OnTimer event of the
form iteslf instead?
Many thanks
Peter Kinsman