how to run a command from a cell

S

Seede

i have a list of filenames in Column A. i want to be able to setup links in
Column B that would launch a executable with the value of associated row in
Column A
for eg

id Launch
1032 Notepad.exe 1032
1033 Notepad.exe 1033
1034 Notepad.exe 1034
1035 Notepad.exe 1035
 
J

Jacob Skaria

Hi Dear

You can use the below piece of code to call a exe from VBA. Post back for
any help

Shell Range("A1"),vbNormalFocus

If this post helps click Yes
 
O

OssieMac

Is 1032, 1033 etc the name of text files? If so, then check out Hyperlink
function.

You will need the .txt extension on the file names (1032.txt) and ensure
that Notebook.exe is the default application for .txt files.

Example of Hyperlink function showing the path to the .txt files and
concatenation of the filenames in Column A.

=HYPERLINK("C:\Users\Ossie\Documents\Text Editor\" & A2)

If you need to edit a cell with a hyperlink then click on the cell and hold
the button until you see the cross then you can edit it without it activating
the hyperlink.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top