License Key (Trying to Add Dashes)

Posted on 2006-04-14
Last Modified: 2010-05-01
Im trying to add dashes to my one string just every 4 Chr add dash

Question by:thaburner
    1 Comment
    LVL 26

    Accepted Solution

    Dim s As String

    s = "ABCD1234ABCD1234ABCD"

    Debug.Print Mid(s, 1, 4) & "-" & Mid(s, 5, 4) & "-" & Mid(s, 9, 4) & "-" & Mid(s, 13, 4) & "-" & Mid(s, 17, 4)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Suggested Solutions

    Introduction This article makes the case for using two modules in your VBA/VB6 applications to provide both case-sensitive and case-insensitive text comparison operations.  Recently, I solved an EE question using the LIKE function.  In order for th…
    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…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    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…

    779 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

    9 Experts available now in Live!

    Get 1:1 Help Now