ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA and ComDlg32.ocx (https://www.excelbanter.com/excel-programming/317833-vba-comdlg32-ocx.html)

William[_7_]

VBA and ComDlg32.ocx
 
Hi,

I put a button on Excel's sheet and open a Common Dialog box.

I created and run it well on some PCs with Excel9.0/Excel10.0/Excel11.0.

But it failed on one of WindowsXP Pro. SP2/Excel11.0. It said that
"Microsoft Common Dialog 6.0 can not be used", though ComDlg32.ocx is
there(\Windows\system32).

Then, on this special PC, I tried as follows,
(1) Open Excel
(2) input a controller and choose "Microsoft Common Dialog 6.0"
(3) put it on Sheet1

At this time, Excel said "The object can not be inserted".

Please help me to solve the problem?

Thanks

William


AA2e72E

VBA and ComDlg32.ocx
 
Windows manages access to COMDLG32.OCX very cleverly. Even if it exists, it
may not be used. The version that can be used freely comes with VB6/Visual
Studio.
ALL the methods in this OCX can be replicated by Windows API calls
(available on all PCS) although this means more code.

"William" wrote:

Hi,

I put a button on Excel's sheet and open a Common Dialog box.

I created and run it well on some PCs with Excel9.0/Excel10.0/Excel11.0.

But it failed on one of WindowsXP Pro. SP2/Excel11.0. It said that
"Microsoft Common Dialog 6.0 can not be used", though ComDlg32.ocx is
there(\Windows\system32).

Then, on this special PC, I tried as follows,
(1) Open Excel
(2) input a controller and choose "Microsoft Common Dialog 6.0"
(3) put it on Sheet1

At this time, Excel said "The object can not be inserted".

Please help me to solve the problem?

Thanks

William



William[_7_]

VBA and ComDlg32.ocx
 
Thans for the response.

I have tried many PCs without VB/VC installation and it works well.
Only one PC has such problem. I don't know why and how to work around it?

William

Windows manages access to COMDLG32.OCX very cleverly. Even if it exists,

it
may not be used. The version that can be used freely comes with VB6/Visual
Studio.
ALL the methods in this OCX can be replicated by Windows API calls
(available on all PCS) although this means more code.




All times are GMT +1. The time now is 11:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com