ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how to run a command from a cell (https://www.excelbanter.com/excel-worksheet-functions/224340-how-run-command-cell.html)

Seede

how to run a command from a cell
 
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




Jacob Skaria

how to run a command from a cell
 
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
---------------
Jacob Skaria


OssieMac

how to run a command from a cell
 
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.


--
Regards,

OssieMac


"Seede" wrote:

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





All times are GMT +1. The time now is 08:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com