473,395 Members | 1,629 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Recognising and opening the USB Modem

14
Dear Experts, please I have come again for help. I have Huawei E1550. I want my form (OnLoad events) to recognise my Modem. Confirming from control panel/Modem, my Modem is named Comm5. I used the following code but it showing RunTime error *424*. Please help me. Thank you

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2.  
  3. MSComm1.Settings="9600,n,8,1"  
  4. MSComm1.CommPort=5         
  5. MSComm1.PortOpen=TRUE            
  6.  
  7. End Sub
  8.  
Jan 21 '16 #1
3 1015
zmbd
5,501 Expert Mod 4TB
424 errors result when you haven't defined the object, in this case "MSComm1" and/or properly set the reference to the object.

In this case, I do believe that you are going to have to use an API call. I'll have to look in to that unless one of the other experts has more experience with setting the reference.

You also should consider setting the option explicit for all of your modules and properly defining your variables as given in the trouble shooting section > Before Posting (VBA or SQL) Code
Jan 23 '16 #2
Hishow
14
Thank yo for your reply. Please I will be waiting for your help on this.
Jan 25 '16 #3
zmbd
5,501 Expert Mod 4TB
This is an older document from Microsoft; however, it might yet "fit the bill;" however, even if not a perfect fit, this will at least give us a starting point from which to jump:
ACC: How to Dial a Phone Number from MS Access 95/97 In the linked to article, instead of a function as shown in step 3 and assigning as shown in step 5 - create a sub and assign by:
Opening the form in design view,
Add the button
In the on_Click event, select the "Code Builder"
In the
Expand|Select|Wrap|Line Numbers
  1. Sub CommandButtonName_Click()
  2. End Sub
that is created for the button event, insert the function's code as given above - including the parameters.

See how this goes. :)
Jan 25 '16 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Etienne Labuschagne | last post by:
Assuming the modem is on COM5: m = open('COM5','wb+') m.write('+++\r\n') m.flush() m.write('ATQ0V1E0\r\n') m.flush() m.write('ATDT5551234;\r\n') m.flush() response = m.read()
8
by: Steve Mills | last post by:
I opened an mdb file with a text editor, deleted random chunks of data from it and then saved it. Now it won't open. Fortunately, it wasn't one of mine - it was from the accounts department, but...
6
by: John J. Hughes II | last post by:
My code starts a TCP/IP socket listener and waits for incoming connections. This works fine on my system and my test system but I have a customer who say it does not work on their system. As far...
17
by: Franc Zabkar | last post by:
My D-Link DSL-302G modem/router has a real-time clock whose settings are volatile. To avoid hand keying the date/time via the modem's JS interface, I wonder if there is a way to copy the JS code to...
2
by: gad | last post by:
I have a program in VS2005 that dialing to a given phone number through modem and connect to another modem. I am using the serial port and dialing with atdt command. How can i write the connection...
0
by: bishnu12 | last post by:
Hi all, There are two questions 1. I am trying to write a programme which can query to a modem get the modem details. i am using normal send() and recv() functions. But when i try to fetch a...
3
by: Nutshell | last post by:
Hello everybody, in my application I'd need to know if a com port is a modem or not (and eventually its description and if it is a null modem). I get the list of com ports available with: string...
2
by: muruganyuva | last post by:
hi, in my project i'm sending the data from source to destination with the help of modem. one modem at the source and other at the destination. at first i'm initializing the source modem. ...
3
by: sangith | last post by:
Hi, I am working as a software test engineer(testing docsis compliant devices like cable modem). I have done Perl programming involving hashes, files, regex and modules. But right now, I have to...
2
by: thomkola | last post by:
My lap top was functioning very good. But for the last two days after booting the machine if i click on any desktop ikons it takes lot of time to open the programmes. but recyle bin and my computer...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.