Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Adding ascii-art to command prompt through VBA

I have some code that opens up command prompt, and requires a user to sign in through windows command prompt. I’ve gotten complaints about it being really ugly that they have to log in like that, so I thought I’d add some Ascii-art to the terminal so it gives something to look at (below). Any ideas how I would be able to format that in VBA to result in some nice art for the terminal?
shellOUT = oShell.Run("cmd.exe /s /c echo Art Here & " & f & " " & cf, vbNormalFocus, True) it would need to go in between "Echo" and "&" where it says "Art Here"


       ____             
      / __ \ ___  _   __
     / / / // _ \| | / /
    / /_/ //  __/| |/ / 
   /_____/ \___/ |___/  
                        

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

You can do:

Dim myArt As String

myArt = _
    "       ____             " & vbNewLine & _
    "      / __ \ ___  _   __" & vbNewLine & _
    "     / / / // _ \| | / /" & vbNewLine & _
    "    / /_/ //  __/| |/ / " & vbNewLine & _
    "   /_____/ \___/ |___/  " & vbNewLine & _
    "                        " & vbNewLine

shellOUT = oShell.Run("cmd.exe /s /c echo " & myArt & ..., vbNormalFocus, True)
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading