473,406 Members | 2,849 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,406 software developers and data experts.

Using call shell to open a specified folder

4
Hi
Am using
Expand|Select|Wrap|Line Numbers
  1. Call Shell("explorer.exe c:\", vbNormalFocus)
this works fine however i have the folder location stored in a txt field and would like the button to retrieve that location

Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdShortcut_Click()
  2.     Dim strShortcut As String
  3.     strShortcut = Me.txtShortcut
  4.  
  5.     Call Shell("explorer.exe" & strShortcut, vbNormalFocus)
  6. End Sub
tried this but not working, says path not found although copy pasting the path works.
I tried to use hyperlinks and they didnt work either.
any ideas greatly appreciated. j
Jan 4 '07 #1
4 15906
JonniP
4
just to clarify the path i copy and paste is the one in "txtshortcut"
Jan 4 '07 #2
ADezii
8,834 Expert 8TB
Hi
Am using
Expand|Select|Wrap|Line Numbers
  1. Call Shell("explorer.exe c:\", vbNormalFocus)
this works fine however i have the folder location stored in a txt field and would like the button to retrieve that location

Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdShortcut_Click()
  2.     Dim strShortcut As String
  3.     strShortcut = Me.txtShortcut
  4.  
  5.     Call Shell("explorer.exe" & strShortcut, vbNormalFocus)
  6. End Sub
tried this but not working, says path not found although copy pasting the path works.
I tried to use hyperlinks and they didnt work either.
any ideas greatly appreciated. j
This will work fine, you simply needed a space after explorer.exe:
Expand|Select|Wrap|Line Numbers
  1. Dim retVal
  2. retVal = Shell("explorer.exe " & Me![txtShortcut], vbNormalFocus)
Jan 4 '07 #3
JonniP
4
Cheers! i feel so stupid now!
Thanks again
Jan 5 '07 #4
NeoPa
32,556 Expert Mod 16PB
LMAO.
But we've all done that Jonni.
The important thing is that you're sorted :)
Jan 7 '07 #5

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

Similar topics

4
by: Yuri Vorontsov | last post by:
Hallo! We have troubles (post XP SP2) to open local folders from the web application: - the web application allows users to select a local file (input type=file) - the system DOES NOT upload...
2
by: tripyre | last post by:
I recently resolved an issue I had with passing a variable to a call shell command, but now I need it to pause or leave the window open so I can manually close it. Below is my code, and I am not...
3
by: Aaron | last post by:
My application will only be used on windows based machines. I need to open a folder using UNC naming. i.e. \\server\share\folder I do not need to do anything programatically with the folder...
4
by: santel_helvis | last post by:
Hi there, I wanna open the folder using asp.net. I am using anchor link to do that. But in href part how shall I give the location. Anyone plz help me out. Thanks in advance
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?...
0
by: Aaron | last post by:
I have two imagebuttons in my asp.net (I'm using vb.net) application. I need one of them to open a folder and one to open a file within the aforementioned folder. I am not sure which class...
2
by: JirkaJ | last post by:
Hello, is it possible(and how?) to make a new database in a specified folder - i.e. /home/me/mysqldb? or how may i install mysql on debian to use this folder for data files? thanks j.
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...
3
by: BASSPU03 | last post by:
Private Sub FilePath_Click() Rem Me! Dim stAppName As String Dim stlink As String stlink = Me! stAppName = "C:\Program Files\Internet Explorer\IEXPLORE.EXE...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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...
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...

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.