ProgressBar control in 64-bit Excel


G

Greg Lovern

I'm using a ProgressBar from mscomctl.ocx in 32-bit Excel, where it
works fine in various versions of Excel including 2010.

But in 64-bit Excel 2010, it can't find the library, and I don't see
mscomctl.* anywhere on the computer (Windows 7).

On another 64-bit Windows 7 computer, this one running 32-bit Excel
2010, I do see mscomctl.ocx, in the SysWOW64 folder. The progress bar
control works fine there (in 32-bit Excel).

Is mscomctl.ocx installed by 32-bit Excel, and not installed by 64-bit
Excel?

Is it possible to have a workbook that uses the ProgressBar control
from mscomctl in 32-bit Excel, but does not use it (and does not give
the user an error) in 64-bit Excel? Currently when I open the workbook
in 64-bit Excel, I get an error that it can't find the library.

This workbook goes out to thousands of vendors, and needs to work in
both bitness environments, including vendors who may pass the workbook
back and forth between users, some of whom may be on 32-bit Excel
while others are on 64-bit Excel. Is there a better solution that just
ripping out all the progress bars and replacing them with simple
percentage counters?


Thanks,

Greg
 
Ad

Advertisements

G

GS

Greg Lovern presented the following explanation :
I'm using a ProgressBar from mscomctl.ocx in 32-bit Excel, where it
works fine in various versions of Excel including 2010.

But in 64-bit Excel 2010, it can't find the library, and I don't see
mscomctl.* anywhere on the computer (Windows 7).

On another 64-bit Windows 7 computer, this one running 32-bit Excel
2010, I do see mscomctl.ocx, in the SysWOW64 folder. The progress bar
control works fine there (in 32-bit Excel).

Is mscomctl.ocx installed by 32-bit Excel, and not installed by 64-bit
Excel?

Is it possible to have a workbook that uses the ProgressBar control
from mscomctl in 32-bit Excel, but does not use it (and does not give
the user an error) in 64-bit Excel? Currently when I open the workbook
in 64-bit Excel, I get an error that it can't find the library.

This workbook goes out to thousands of vendors, and needs to work in
both bitness environments, including vendors who may pass the workbook
back and forth between users, some of whom may be on 32-bit Excel
while others are on 64-bit Excel. Is there a better solution that just
ripping out all the progress bars and replacing them with simple
percentage counters?


Thanks,

Greg

AFAIK there is no 64-bit version of mscomctl.ocx and so the 32-bit
version is the last release of that. Most of these have been replaced
with 64-bit DLLs for Windows 64-bit editions, so you might have to see
if one exists for what you are trying to do. Obviously, if one does
exist, you'll need to work with it as a DLL and not an OCX. This
requires different approach in your code!

What I'm not sure about is whether 64-bit MSO apps can use 32-bit OCXs
since they don't install in the 64-bit System directory. (As you
discovered already)
 
G

Greg Lovern

Hi Garry,
AFAIK there is no 64-bit version of mscomctl.ocx and so the 32-bit
version is the last release of that.

Yes, I have since found confirmation of that here, where Microsoft
employee Greg Lindhorst says so:

http://social.technet.microsoft.com...t/thread/f3a71d69-580b-4cdb-ae0b-d8189e6cfd40

Most of these have been replaced
with 64-bit DLLs for Windows 64-bit editions, so you might have to see
if one exists for what you are trying to do.

I don't see one, and Greg Lindhorst of Microsoft said there isn't one.

mscomctl.ocx was originally from VB6. Since the demise of classic VB,
it has only been distributed with Office and maybe some other
Microsoft applications. If Office isn't making a 64-bit version of
mscomctl.ocx, then probably no one is.

What I'm not sure about is whether 64-bit MSO apps can use 32-bit OCXs
since they don't install in the 64-bit System directory. (As you
discovered already)

64-bit Excel can't load a 32-bit library or component, or anything
else that would run in Excel's address space. This includes standard
DLLs, COM DLLs, and OCX controls. For 64-bit Excel to be able to run
something 32-bit, it would have to be a COM EXE, as that would run in
it's own address space and Windows would handle the thunking between
them. But an EXE would be a weird an inefficient way to do a control.


Greg
 
J

Jim Cone

Try a test of the Win32 compiler constant...

#If Win32 then
'use progress bar
#Else
'use statusbar ?
#End If

--
Jim Cone
Portland, Oregon USA
http://www.mediafire.com/PrimitiveSoftware
(free and commercial excel programs)

..
..
..

"Greg Lovern" <[email protected]>
wrote in message
I'm using a ProgressBar from mscomctl.ocx in 32-bit Excel, where it
works fine in various versions of Excel including 2010.

But in 64-bit Excel 2010, it can't find the library, and I don't see
mscomctl.* anywhere on the computer (Windows 7).

On another 64-bit Windows 7 computer, this one running 32-bit Excel
2010, I do see mscomctl.ocx, in the SysWOW64 folder. The progress bar
control works fine there (in 32-bit Excel).

Is mscomctl.ocx installed by 32-bit Excel, and not installed by 64-bit
Excel?

Is it possible to have a workbook that uses the ProgressBar control
from mscomctl in 32-bit Excel, but does not use it (and does not give
the user an error) in 64-bit Excel? Currently when I open the workbook
in 64-bit Excel, I get an error that it can't find the library.

This workbook goes out to thousands of vendors, and needs to work in
both bitness environments, including vendors who may pass the workbook
back and forth between users, some of whom may be on 32-bit Excel
while others are on 64-bit Excel. Is there a better solution that just
ripping out all the progress bars and replacing them with simple
percentage counters?


Thanks,

Greg
 
G

Greg Lovern

Hi Jim,
Try a test of the Win32 compiler constant...

#If Win32 then
     'use progress bar
#Else
    'use statusbar ?
#End If

I'm using compiler constants for other purposes, especially standard
DLLs. But for the ProgressBar control, the error occurs when opening
the workbook, because it's a reference in the Controls toolbox.
Conditional compiling doesn't help with references.

Is it possible to use the ProgressBar control without a reference?

Greg
 
J

Jim Cone

Greg,
re: "...use without a reference"
I don't know.
'--
Jim Cone



"Greg Lovern" <[email protected]>
wrote in message

Hi Jim,
Try a test of the Win32 compiler constant...

#If Win32 then
'use progress bar
#Else
'use statusbar ?
#End If

I'm using compiler constants for other purposes, especially standard
DLLs. But for the ProgressBar control, the error occurs when opening
the workbook, because it's a reference in the Controls toolbox.
Conditional compiling doesn't help with references.

Is it possible to use the ProgressBar control without a reference?

Greg
 
Ad

Advertisements

G

GS

Greg Lovern formulated on Wednesday :
Hi Jim,


I'm using compiler constants for other purposes, especially standard
DLLs. But for the ProgressBar control, the error occurs when opening
the workbook, because it's a reference in the Controls toolbox.
Conditional compiling doesn't help with references.

Is it possible to use the ProgressBar control without a reference?

Greg

Why can't you make your own progress bar? I'm sure J-Walk has some code
for that!
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top