Most valuable professional
  • Hot Topics

Excel excel macro to execute windows run command?

I found the following code here on these forums but it errors out . I guess X is a variable that needs to be defined? Or is there another method to get the run command to come up? Sub Macro1()x = Shell("cmd.exe /c C:\TestFolder\Book1.pdf", 1)End Sub

This question generated 29 answers. To proceed to the answers, click here.

This thread is current as of March 10, 2014.

For more resources for Microsoft Excel:

This article includes the following tags:

  • Excel
  • Microsoft Excel