Adding hyperlinks with parameters

  • Thread starter Thread starter Pasha
  • Start date Start date
P

Pasha

Hey everybody
I have a batch file which needs to be run from an excel sheet with a
parameter, like this:
c:\1.bat myParameter
But when i try to run the Hyperlink, the Excel shows an error message
saying it can't open the specified file (probably because the is a
space between the file and the parameter)

is there any known way to run the link from the excel?
 
Hey everybody
I have a batch file which needs to be run from an excel sheet with a
parameter, like this:
c:\1.bat myParameter
But when i try to run the Hyperlink, the Excel shows an error message
saying it can't open the specified file (probably because the is a
space between the file and the parameter)

is there any known way to run the link from the excel?

hello again :)
I think i have an idea how to do it:
I have made a VBA macro which runs the batch file successfully, but
now my problem is how to send the parameters to the macro

Does enybody have an idea?
TIA,
Pasha.
 
Hi Pasha,
Whenever you pass parameters or spaces you have to pipe it thru the command processor. And nest any possible quotes in quotes.

Cmd = Environ("ComSpec") & " /c """ & strZipBatchFile & """"

See this
http://groups.google.com/group/micr...nviron("ComSpec")+group:*vb*#da14ec82e0220d31


John


Hey everybody
I have a batch file which needs to be run from an excel sheet with a
parameter, like this:
c:\1.bat myParameter
But when i try to run the Hyperlink, the Excel shows an error message
saying it can't open the specified file (probably because the is a
space between the file and the parameter)

is there any known way to run the link from the excel?

hello again :)
I think i have an idea how to do it:
I have made a VBA macro which runs the batch file successfully, but
now my problem is how to send the parameters to the macro

Does enybody have an idea?
TIA,
Pasha.
 
Hey John,
Sending the params using VBA is not my major problem.
The problem is how to send those parameters to the macro itself, and
how to dosplay the button that runs it..

Thanks,
Pasha
 
Hi Pasha,
You lost me.
Do you want to get the output from the batch file?

You would need to use STDIN, STDOUT with AllocConsole.
See this. http://support.microsoft.com/kb/q171654/

John


Hey John,
Sending the params using VBA is not my major problem.
The problem is how to send those parameters to the macro itself, and
how to dosplay the button that runs it..

Thanks,
Pasha
 
Back
Top