Solved

MsComm32

Posted on 1997-12-13
9
794 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

705 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