473,394 Members | 1,889 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,394 software developers and data experts.

Command to open a file on a S Drive Error

When I click the button I get this Error
"Run-time error '53' file not found"
What am I doing wrong?

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command8_Click()
  2. 'Note: This is to open S Drive file for notes Managment only
  3. On Error GoTo Err_Command8_Click
  4.  
  5.     Dim stAppName As String
  6.  
  7.     stAppName = "S:\Security\Operations Support\Intake DB"
  8.     Call Shell(stAppName, 1)
  9.  
  10. Exit_Command8_Click:
  11.     Exit Sub
  12.  
  13. Err_Command8_Click:
  14.     MsgBox Err.Description
  15.     Resume Exit_Command8_Click
  16.  
  17. End Sub
Oct 6 '10 #1
9 1368
Mariostg
332 100+
You have to specify what program to use to open your file. If you want to open it with Notepad use:
Expand|Select|Wrap|Line Numbers
  1. stAppName = "notepad.exe S:\Security\Operations Support\Intake DB"
  2.  
Oct 6 '10 #2
MMcCarthy
14,534 Expert Mod 8TB
Also I would normally include the file extension. For example ...

Expand|Select|Wrap|Line Numbers
  1. stAppName = "MSAccess.exe S:\Security\Operations Support\Intake DB.mdb"
Oct 6 '10 #3
Mariostg
332 100+
Yes of course... And I would avoid spaces in my file and directory names.
Oct 6 '10 #4
??? why would I open a file as an exe doc?
ummm ok I am opening a File that has documents in it. I don't want to Open any 1 document just to take them to the file.
Oct 6 '10 #5
MMcCarthy
14,534 Expert Mod 8TB
Susan

Are you trying to open a file or a folder?

The MSAccess.exe part is not for the file it is for the application used to open the file.

If you are trying to open a folder this is not the way to do it.
Oct 6 '10 #6
oops! yes a folder
Oct 6 '10 #7
NeoPa
32,556 Expert Mod 16PB
Susan,

You need to explain what you actually need. In clear English please. It is not acceptable to post questions after two seconds of preparations as this wastes the time of our experts. Work out the question first then post it only when it makes proper sense.

I think we can probably help here, but it's still unclear what type of "Open" you're even after.
Oct 6 '10 #8
I just want a command button to open a folder on the SDrive the path is as follows.
"S:\Security\Operations Support\Intake DB"
Oct 7 '10 #9
NeoPa
32,556 Expert Mod 16PB
After all that explanation you come back with a post that took you two seconds to submit and even less to consider. If that were indeed true then we wouldn't need to keep asking you for further clarification would we? Please either get involved and pay attention, or give up. Otherwise you're simply wasting everyone's time and, you may be able to tell, patience is running thin.
Oct 7 '10 #10

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

Similar topics

2
by: Simon Harvey | last post by:
Hi all, I am looking to make an open source Drive space viewer. One that displays the sizes in a graph and lets you move through the directories via a treeview at the left. I have three...
1
by: William Starr Moake | last post by:
Another problem with the browser-based WYSIWYG editor I'm trying to assemble using IE's design mode. This opens the selected page in the editor iframe named iView: <select name="template"...
6
by: Charles Morrall | last post by:
I have no experience with DB2 as such, but I've been tasked with configuring backup of a server running DB2 v8 on Windows Server 2003. I do have some experience with backups in general though. The...
1
by: Amrit Kohli | last post by:
Hello. I am trying to run the VS C++ compiler from the command line. I enter the following: cl -GX prog1.cpp It compiles the file fine, but then when it goes to link the object file, I...
0
by: Me | last post by:
I have an application that has a text box. At the end on the text box is the standard elypsis (command button) for launching the Open File Dialog box. I want the user to select a certain executable...
0
by: gm | last post by:
Immediately after generating the Access application from the Source Safe project I get: "-2147467259 Could not use ''; file already in use." If Access database closed and then reopened I get:...
5
by: vshalpatel | last post by:
Hi I want to use SQL*Loader , an Oracle-supplied utility to load data from a flat file into one database tables. for this I have write the scripts in the SQL*LOADER control file named ...
4
by: xerannyo | last post by:
my OS is windows XP SP2 my problem occured after getting infected by a wscript.exe worm but was sucessfuly removed by my kaspersky....now i cannot open my local driive in explorer by double...
2
by: pandehrushikesh | last post by:
I am doing setup project in VS 2008. I used custom action to select file from local drives. On the button click of custom action form, I am launching Open file dialog as ...
2
by: pandehrushikesh | last post by:
I am using Vista Business SP1. When I run some application "As Administrator" (even if I am administrator), Open file dialog does not show the mapped drive or network locations. any Idea???
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.