473,466 Members | 1,367 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to use the "Shell" method to open up a file?

lee123
556 Contributor
I have a program that im making and i want to click on a button to open up file or registration file. i did it once before buti cant remember how i used the "Shell" function to do it. my code i think I Did is this.

Expand|Select|Wrap|Line Numbers
  1. Private Sub CloneDVDKey_Click()
  2.  
  3. Shell "InternetExplorer C:\Program Files\Soft2011\Clonedvd_Key_12510154.CloneDVD.Exe",VbNormalFocus
  4.  
  5. End Sub
I think I Did this this way but when i try it, It has an error No Path Or something like that. Can anyone help me am i suppose to dim somthing orand something else to this

lee123
Jan 26 '11 #1
4 1460
horace1
1,510 Recognized Expert Top Contributor
check the path to internet explorer, I think it should be
Expand|Select|Wrap|Line Numbers
  1.         Shell("C:\Program Files\Internet Explorer\iexplore", vbNormalFocus)
  2.  
Jan 26 '11 #2
lee123
556 Contributor
well it's not on the web i have it in the folder specified but it's a file, like i said i have did this code once but i never saved how i did it. i havent tried your code but i dont think it's going to work. because it's in a folder

lee123
Jan 26 '11 #3
horace1
1,510 Recognized Expert Top Contributor
the following worked OK for me using Visual Studio 2008
Expand|Select|Wrap|Line Numbers
  1.         Shell("C:\Program Files\Internet Explorer\iexplore C:\temp\Test.html", vbNormalFocus)
  2.  
it started Internet Explorer which opened the file Test.html and displayed it
Jan 26 '11 #4
lee123
556 Contributor
I Have Figured It Out The Correct Code Was This

Expand|Select|Wrap|Line Numbers
  1. Private Sub CloneDVDKey_Click()
  2.     Shell ("Explorer.exe C:\CloneDVD_Key_12510154.CloneDVD"), vbNormalFocus
  3. End Sub
Maybe Someone else can use this for an example but it opened it up correctly thanks for your help Horace1

lee123
Jan 26 '11 #5

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

Similar topics

9
by: Mike Von Stein | last post by:
Maybe I'm missing something obvious, but if I several MDB's that use the same secure workgroup MDW file and the user logs into one of them is there a way through code that I can open other...
1
by: jiatiejun | last post by:
I want to write a file tools that can access files by "send to " or "Open with " in Explorer shell but I don't know how to implement who can help me thanks
9
by: Amjad | last post by:
I'm trying to create a folder, append text file to another, and delete files using the "Shell" command. But I always get the error "File Not Found". How do I use DOS commands from Visual Basic?...
30
by: bblais | last post by:
Hello, Let me start by saying that I am coming from a background using Matlab (or Octave), and C++. I am going to outline the basic nuts-and-bolts of how I work in these languages, and ask for...
1
by: key9 | last post by:
Hi all I have some data to process, whith complex mechanism,I put these process mechanism as plugins. and design lots of classes to abstract data themselves. but the question is how to drive...
1
by: Stinky Pete | last post by:
Hi, With thanx to the group and suggestions to review other news sites, I've got some code that allows me to open Adobe from Access. As I am new at this, I still need some help though. The...
5
by: Matthew Zhou | last post by:
I check the ISO 9899 standard, \r (carriage return) Movesthe active position to the initial position of the current line. What does it do? How to input? I tried to use Flex to check this...
3
by: ManningFan | last post by:
Due to the way our IT group has set up our servers, we are not allowed to use the Shell() command. We are already doing a similar action with an FTP command. Our code is thus: sExe =...
7
by: dieter | last post by:
Hi, Overview ======= I'm doing some simple file manipulation work and the process gets "Killed" everytime I run it. No traceback, no segfault... just the word "Killed" in the bash shell and...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
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...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
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: 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.