How can I read the state of external mechanical switches from within a Visual Basic Macro?

Posted on 2009-12-22
Last Modified: 2013-12-20
I wish to read the state of several mechanical switches from within a Visual Basic macro running within MS Word or Excel on a laptop, preferable using a cable or IO module with a USB interface.  Can this be done using a library function to access my DLP-IO8-G from a VB macro, or do I need another physical interface?  
Question by:Phule
    LVL 5

    Accepted Solution


    Author Closing Comment

    Answer was generic, listing far more lines of code than I actually needed for my particular requirements.  

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
    Introduction In a recent article ( for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    745 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now