Solved

MsComm32

Posted on 1997-12-13
9
773 Views
Last Modified: 2008-02-01
Did anyone know the us of mscomm32.ocx in access97.
How do i initalisize this ocx?
Dim oCom1 As ????
Set oCom1 = ????
If have the ocx-file, but there's alos a file called "comm96.hlp", fomerly shipped by Microsoft.
0
Comment
Question by:JochenKramer
  • 6
  • 3
9 Comments
 
LVL 4

Accepted Solution

by:
ozphil earned 200 total points
ID: 1962259
if you insert the ocx, you can use it without any vba initialisation.

insert/activex control and select 'microsoft communications control version 5.0'.

give the name of control a sensible name like oCom1 and you can use its properties and methods as you would any other control.
0
 
LVL 4

Expert Comment

by:ozphil
ID: 1962260
You can also refer to object without inserting ocx in a form.

To include the mscomm32.ocx library references, make sure you  viwinf any module in desing mode and do tools/references/ and check 'Micorsoft Comm Control 5.0'. if its not in the list, browse for it in c:\windows\system\mscomm.ocx.

MSComm is the name of the comms object class.


You can code like this:
Sub comms()
Dim i As Integer
Dim oCom As New MSComm
i = oCom.CommPort
Set oCom = Nothing
End Sub



0
 
LVL 4

Expert Comment

by:ozphil
ID: 1962261
If you desire further elaboration please provide a comment.
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

by:JochenKramer
ID: 1962262
Hi,
thanks for your answer, but i have still problems

i entered the your code and get error
"cannot create object from activex"

mscomm32 is registered by regsvr32
in access it is in the object-catalog and a testprogramm for listing references shows me the name of the library and the version (1.1)
Whats wrong now?
Do i need other files or dlls?

Greetings
Jochen

0
 
LVL 4

Expert Comment

by:ozphil
ID: 1962263
You havent quite installed this animal's activeX and references.

I have reproduced your error by removing the activeX/references installation.

I did not register using regsvr32.

For activeX registration please do following via Access 97 module design mode:
tools/activeX controls.../Register/navigate to mscomm32.ocx and OK it. it should now register. You should then see' Microsoft Communications Control, version 5.0' in list.

For References registration please do following via Access 97 module design mode:
tools/references/browse/navigate to mscomm32.ocx and OK it.
You should then see' Microsoft Comm control 5.0' in list. If at beginning you see 'MISSING:Microsoft Comm control 5.0', uncheck it, OK it, and repeat registration.

If you follow the above two procedures the code willl work.

0
 

Author Comment

by:JochenKramer
ID: 1962264
Sorry, but it did't work.
I made a proc for testing the references like this:

Sub ShowMeAll()
Dim ref As Reference
For Each ref In References
    If ref.IsBroken = False Then
        Debug.Print "Name: ", ref.Name
        Debug.Print "Fullpath: ", ref.FullPath
        Debug.Print "Version: ", ref.Major & "." & ref.Minor
    Else
        Debug.Print "Verweis ist ungültig: ", ref.Guid    
    End If
Next ref        
End Sub
Output (last two)
Name:         Msacal20
Fullpath:     D:\WINPROGS.16\ACCESS20\ADT\MSACAL20.OCX
Version:      1.0
Name:         MSCommLib
Fullpath:     C:\WINNT\system32\mscomm32.ocx
Version:      1.1

i think the ocx is active in access, but i have still the same error message "cannot create object from activex"

What can i do now? Is there a difference between the american  and my german access version?
Thank you for your help
Jochen
0
 
LVL 4

Expert Comment

by:ozphil
ID: 1962265
Is the activeX installed also via tools/activeX controls.

the error message can appear if supporting dlls are incorrect.

this type of error is a real pain.

By the way  im running win95.
0
 

Author Comment

by:JochenKramer
ID: 1962266
It's also installed by tools/activeX Controls
Im running win95 too with same problems.
Which dlls i need too, i think i have only mscomm32.ocx
0
 
LVL 4

Expert Comment

by:ozphil
ID: 1962267
who knows.

i found this file mscomm32.dep in system directory, look at contents below and see if you can work out what your country dependency is and whats missing. good luck.

contents of mscomm32.dep:
--------------------------------------------

; Dependency file for setup wizards.

[Version]
Version=5.0.37.14

; Dependencies for MSComm32.ocx

; Default Dependencies ----------------------------------------------

[MSComm32.ocx]
Dest=$(WinSysPath)
Register=$(DLLSelfRegister)
Version=5.0.37.14
Uses1=ComCat.dll
Uses2=
CABFileName=MSComm32.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb5
CABINFFile=MSComm32.inf

[ComCat.dll]
Dest=$(WinSysPathSysFile)
Register=$(DLLSelfRegister)
Uses1=

; Localized Dependencies --------------------------------------------

; ** German (DE) ***
; (0007 = German)
;
[MSComm32.ocx <0007>]
Uses1=MSComDE.dll
Uses2=

[MSComDE.dll <0007>]
Uses1=
CABFileName=MSComDE.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb5
CABINFFile=MSComDE.inf

; ** French (FR) ***
; (000C = French)
;
[MSComm32.ocx <000C>]
Uses1=MSComFR.dll
Uses2=

[MSComFR.dll <000C>]
Uses1=
CABFileName=MSComFR.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb5
CABINFFile=MSComFR.inf

; ** Italian (IT) ***
; (0010 = Italian)
;
[MSComm32.ocx <0010>]
Uses1=MSComIT.dll
Uses2=

[MSComIT.dll <0010>]
Uses1=
CABFileName=MSComIT.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb5
CABINFFile=MSComIT.inf

; ** Spanish (ES) ***
; (000A = Spanish)
;
[MSComm32.ocx <000A>]
Uses1=MSComES.dll
Uses2=

[MSComES.dll <000A>]
Uses1=
CABFileName=MSComES.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb5
CABINFFile=MSComES.inf

; ** Japanese (JP) ***
; (0011 = Japanese)
;
[MSComm32.ocx <0011>]
Uses1=MSComJP.dll
Uses2=

[MSComJP.dll <0011>]
Uses1=
CABFileName=MSComJP.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb5
CABINFFile=MSComJP.inf

; ** Korean (KO) ***
; (0012 = Korean)
;
[MSComm32.ocx <0012>]
Uses1=MSComKO.dll
Uses2=

[MSComKO.dll <0012>]
Uses1=
CABFileName=MSComKO.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb5
CABINFFile=MSComKO.inf

; ** Chinese Traditional (CHT) ***
; (0404 = Chinese Traditional)
;
[MSComm32.ocx <0404>]
Uses1=MSComCHT.dll
Uses2=

[MSComCHT.dll <0404>]
Uses1=
CABFileName=MSComCHT.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb5
CABINFFile=MSComCHT.inf

; ** Chinese Simplified (CHS) ***
; (0804 = Chinese Simplified)
;
[MSComm32.ocx <0804>]
Uses1=MSComCHS.dll
Uses2=

[MSComCHS.dll <0804>]
Uses1=
CABFileName=MSComCHS.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb5
CABINFFile=MSComCHS.inf
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question