Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / COM / October 2003



Tip: Looking for answers? Try searching our database.

COMDLG32 in Excel going missing...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike R - 10 Oct 2003 15:26 GMT
We have an Excel macro that calls Microsoft Common Dialog
Control to display a "Save As." dialog. This works on
only some of our clients machines. We've added the
codebase attribute and if the control is not present on
the client machine the user is prompted and the control
is downloaded from Microsoft. We've tried removing
and re-registering the control but it seems to make no
difference. The control is definitely being downloaded
and registered by the codebase attribute but that seems
to be where it stops. Event the code below does not get
it shown. Any ideas gladly received!

Sub aaa()

Set a = CreateObject("MSComDlg.CommonDialog")

a.showsave

End Sub


Peter Huang [MSFT] - 13 Oct 2003 07:14 GMT
Hi Mike,

>Sub aaa()
>
[quoted text clipped - 3 lines]
>
>End Sub

The code stops at which line, the CreateObject line or the showsave line?
What error message did you get?
You may try to register the control manually and run the macro in the excel
application to see if the problem persists.
e.g.
regsvr32 C:\WINDOWS\system32\comdlg32.ocx

Here is a link about Common dialog you may have a check.
HOWTO: Set Up Internet Download for Comdlg32.ocx
http://support.microsoft.com/default.aspx?scid=kb;en-us;168917

Can you explain what will you want to do, just run the macro that open the
Save dialog in the Excel application or automation excel in another program?

I look forward to hearing from you.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security 
This posting is provided "as is" with no warranties and confers no rights.

--------------------
>Content-Class: urn:content-classes:message
>From: "Mike R" <MR@MR.com>
[quoted text clipped - 35 lines]
>
>End Sub
MikeR - 24 Oct 2003 13:05 GMT
Peter

The code does not stop - it steps over the showsave
without actually showing the control.

We actually are running this in a larger routine into
which we force a download from MS of the comdlg32.ocx and
we can see that it arrives and is registered correctly.

We are attempting to control when the user saves a
specific range of information as part of a wider routine -
stopping them from using the File/Save as dialog.

Any ideas outside of machine rebuilds?!!

Thanks

Mike

>-----Original Message-----
>Hi Mike,
[quoted text clipped - 71 lines]
>
>.
Peter Huang - 27 Oct 2003 11:15 GMT
Hi Mike,

Since you are running a big project, we need to isolate the problem.
1. Logon as Administrator.
2. You may try to register the file manually as I said in my last post. [If
you have done you may skip it]
3. create a new excel workbook and run the test macro code.
Add reference to the CommonDialog
by clicking the menu Tool/Reference an Browsing to
C:\windows\system32\comdlg32.ocx
Sub aaa()
Dim comdlg As CommonDialog
Set comdlg = New CommonDialog
comdlg.ShowSave
Debug.Print Err.Description
Debug.Print Err.Number
End Sub
4.  Run the Code to see if the problem persists.

Did the problem persist in other project, e.g. VB6 project?
The test will help us to isolate the problem.
So that we will know if the problem is caused by the ocx file self or the
download procedure.
I will appreciate your efforts.
Please have the test and let me know the result.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security 
This posting is provided "as is" with no warranties and confers no rights.
Peter Huang - 30 Oct 2003 06:47 GMT
Hi Mike,

Did the problem resovled?
If you has any concern on this issue please post here.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security 
This posting is provided "as is" with no warranties and confers no rights.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.