Very clever and Interesting.

0

Would like to be able to acces CMD prompt from an Excel cell using Hyperlink 

But when I put in C:/Windows/System32 in the cell then do Ctl K , I do NOT get CMD prompt as indicated below.

Microsoft Windows [Version 10.0.17134.407]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\Windows\System32>

I am running Microsoft Office Home and Business 2019.

Any suggestions

stubbsy9

Answer
Discuss

Answers

0

I don't think you can use a hyperlink to open the command prompt because the hyperlink will try to open the file it points at, as opposed to run it as a program. The function below will open the command prompt. You can run it from a button on your worksheet or attach it to a cell by linking the cell to a click event.

Function DosCmd()
    DosCmd = Shell("C:\Windows\System32\cmd.exe", 1)
End Function
Discuss

Answer the Question

You must create an account to use the forum. Create an Account or Login