Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Progress Bar Control Problems

Status
Not open for further replies.

ktwclark

Programmer
Jan 30, 2002
54
GB
You've solved my other probs, hope you can solve this one!

I've been developing toolbars and macros for use with Excel and Access for my employer. I develop on/for systems that have either Windows 98 or Windows 2000 installed with a copy of Office 97 Professional installed also. I also do a little bit of extra work on my home PC which has Windows 98 and Office 97 Professional and also VB 6 installed. I have been developing in Windows 98, which my macros work fine for, and am now testing the same toolbars and macros on a Windows 2000 system.

The problem I have is that I have a progress bar on several of my Excel forms that work fine on the 98 systems but not on the 2000 system. I don't know if I added the progress bar control on the work PC or my home PC - my home PC would have more controls registered as it has VB 6 installed. I can't find the progress bar control on my Excel toolbox on my work PC on either 98 or 2000.

Anyway, I have no progress bar control on my Excel toolbox on the Windows 2000 system. When I go to edit my macros, or run them, I get errors saying the object has not been loaded as it is not available on this machine, the Windows 2000 one, however, it is visible and editable on the Windows 98 system.

Both systems have the same object libraries installed. Using the object browser, on both the Windows 98 and Windows 2000 systems, when I have a look at the progress bar control it says "Cannot jump to 'Progress Bar' because it is in the library 'MSComctlLib' which is not currently referenced. I haven't tried this on my home system but imagine the control is referenced and it was added to my Excel project from here.

Do I need to register the ActiveX control on both the work systems, and also any system I deploy to?

Or is something else going on?

Thanks in advance.
 
OK, solved the problem. Different operating systems so different object libraries. The Progress Bar is available in several diiferent formats - when I say formats I mean the same control is available but in different object libraries. Depanding on your operating system, service patches, etc depends on the object libraries you have installed. The Progress Bar can be found in either of the ActiveX controls libraries Comctl32.ocx or mscomctl.ocx - the later being an out-dated, or at least older release than the first. Mscomctl.ocx should be installed with Office 97. It was installed on the 98 systems but for some reason was not installed on the 2000 system. My home system has the newer release comctl32.ocx installed. It was from this system that the progress bar was added to the project. I solved the problem by registering the mscomctl.ocx library on the Windows 2000 manually by selecting RUN from the START button and typing "regsvr32 comctl32.ocx" after copying the file to the WINNT\System32 folder. Once the library was correctly registered the progress bar became available.

I've been programming for years (15+) which shows even experienced users can be easily tripped up. There's a wealth of info a programmer needs to remember and it's all too easy to forget something as straight forward as object libraries.

Still, got there in the end and will hopefully spurn others to not make the same mistake!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top