473,427 Members | 1,623 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,427 software developers and data experts.

Shell Command not working

74
Private Sub Command5_Click()
Dim TaskId As Variant
TaskId = Shell("[C:\Documents and Settings\daveh\My Documents\1011.pdf]")
End Sub

For some reason this code is not working i have checked the path name several times and it is correct, Any thoghts. Thanks in advance.
Aug 30 '07 #1
7 5495
FishVal
2,653 Expert 2GB
Private Sub Command5_Click()
Dim TaskId As Variant
TaskId = Shell("[C:\Documents and Settings\daveh\My Documents\1011.pdf]")
End Sub

For some reason this code is not working i have checked the path name several times and it is correct, Any thoghts. Thanks in advance.
Hi, Hutch.

Try to remove square brackets from the path.
Aug 30 '07 #2
Hutch
74
Still no work any thing else?
Aug 30 '07 #3
FishVal
2,653 Expert 2GB
Still no work any thing else?
Oh, sorry. Didn't notice you try to run pdf. ;)
Use FollowHyperlink instead of Shell.
Aug 30 '07 #4
missinglinq
3,532 Expert 2GB
I know it seems basic, but is the machine you're running this on set up with a default for running .pdf files?

Linq ;0)>
Aug 30 '07 #5
Hutch
74
opps i posted the wrong link, it's an app im trying to run. look at this code

Private Sub Command5_Click()
Shell "Explorer \\Specserv\spec sales\User Data\User Database\Call Logs.mdb"
End Sub

This actually opens the code i had to add "Explorer" to the begining of it. But now i get a prompt asking me if i am sure i want to Down Load the file. How do i get rid of this?!
Aug 30 '07 #6
FishVal
2,653 Expert 2GB
opps i posted the wrong link, it's an app im trying to run. look at this code

Private Sub Command5_Click()
Shell "Explorer \\Specserv\spec sales\User Data\User Database\Call Logs.mdb"
End Sub

This actually opens the code i had to add "Explorer" to the begining of it. But now i get a prompt asking me if i am sure i want to Down Load the file. How do i get rid of this?!
And what about
Expand|Select|Wrap|Line Numbers
  1. FollowHyperlink "\\Specserv\spec sales\User Data\User Database\Call Logs.mdb"
  2.  
or maybe
Expand|Select|Wrap|Line Numbers
  1. CreateObject("Access.Application").OpenCurrentDatabase "\Specserv\spec sales\User Data\User Database\Call Logs.mdb"
  2.  
??
Aug 30 '07 #7
JKing
1,206 Expert 1GB
opps i posted the wrong link, it's an app im trying to run. look at this code

Private Sub Command5_Click()
Shell "Explorer \\Specserv\spec sales\User Data\User Database\Call Logs.mdb"
End Sub

This actually opens the code i had to add "Explorer" to the begining of it. But now i get a prompt asking me if i am sure i want to Down Load the file. How do i get rid of this?!
Try this:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Command5_Click()
  2. Shell "MSACCESS.EXE ""\\Specserv\spec sales\User Data\User Database\Call Logs.mdb"""
  3. End Sub
  4.  
Aug 31 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: lecichy | last post by:
Hello. As in the topic, I use www to execute shell command, in this case 'ls -l' and i get output like: total 8 drwx------ 11 lecichy staff 4096 Oct 15 18:18 Maildir drwx---r-x 3...
1
by: Joe Blo | last post by:
I have this line in my code that spits out (run time error 53, file not found). Running this program (project.exe) works fine if I do it through the command prompt or Run dialogue box on the...
4
by: rkoida | last post by:
Hello evryone I am a newbie to python. I have a makefile which i can compile in UNIX/LINUX, But i I am planning to write a python script which actually does what my MAKEFILE does. The make file...
8
by: Siemel Naran | last post by:
Hi. I'm writing a command shell that reads commands from standard input. At this point I have the command in a std::string. Now I want to execute this command in the shell. From the Borland...
1
by: VRWC | last post by:
Hello dear people, In an A2K app, I have attempted to use the following command in some VBA code with IDENTICAL results with every single version of the following: Shell "outlook.exe", vbHide...
8
by: zhiwei wang | last post by:
I remember that there is a function that could invoke shell command such as "rm" "cp", directly in .c file. But I could not recall its name, and I googled with nothing meaningful. I vaguely...
9
by: Tommy Lu | last post by:
Hi, wondering if there is a way to interact the shell command with the C# program? For example, if I type c:\>ver it then suppose to return the version of the OS I am currently using... or ...
2
by: jcrouse | last post by:
I apologize for starting another thread but the old one had a weird subject line. Anyways...here is the code: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As...
2
by: ¹é¿ø¼® | last post by:
Hello, everybody. I want to call any shell command from php script using shell_exec(). The problem is that the next line of the php script would not be run until a few minutes after running the...
2
by: Lobb[cz] | last post by:
Hi. I have a problem with running application from windows form application (VB.NET). I'm using Call Shell(path, AppWinStyle.NormalFocus, False) but I need to define working directory 2 (in...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.