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

opening folder

Is there a way to have the "work" folder open up and displayed after
the move is made in this code which uses the name statement to move
and rename folders from backup folders to a work folder?

snip ....
Dim strFolderName As String, strPath1 As String, strPath2 As String
Dim intLoop As Integer
On Error Resume Next
strFolderName = InputBox("Enter Folder Name")
If Len(Trim(strFolderName)) > 0 Then
For intLoop = Asc("c") To Asc("z")
strPath1 = Chr$(intLoop) & ":\backup\" & "ab" &
strFolderName & "12"
strPath2 = Chr$(intLoop) & ":\work\" & strFolderName
If Err.Number = 52 Then GoTo skipDrive
Name strPath1 As strPath2
MsgBox "Success"
I thought shell might do it but how would it start Chr$(intLoop) &
":\work\ ?

jenn
Jul 17 '05 #1
2 8797
vic
Try

Shell "explorer.exe " & Chr$(intLoop) & ":\work\", vbNormalFocus

vic

http://groups.yahoo.com/group/WinTips-Tricks/
je**@onlink.net (jenny) wrote in message news:<3d**************************@posting.google. com>...
Is there a way to have the "work" folder open up and displayed after
the move is made in this code which uses the name statement to move
and rename folders from backup folders to a work folder?

snip ....
Dim strFolderName As String, strPath1 As String, strPath2 As String
Dim intLoop As Integer
On Error Resume Next
strFolderName = InputBox("Enter Folder Name")
If Len(Trim(strFolderName)) > 0 Then
For intLoop = Asc("c") To Asc("z")
strPath1 = Chr$(intLoop) & ":\backup\" & "ab" &
strFolderName & "12"
strPath2 = Chr$(intLoop) & ":\work\" & strFolderName
If Err.Number = 52 Then GoTo skipDrive
Name strPath1 As strPath2
MsgBox "Success"
I thought shell might do it but how would it start Chr$(intLoop) &
":\work\ ?

jenn

Jul 17 '05 #2
JP
Try the Windows API function ShellExecute. There is a nice samle at here...
http://www.mvps.org/vbnet/index.html...ellexecute.htm

je**@onlink.net (jenny) wrote in message news:<3d**************************@posting.google. com>...
Is there a way to have the "work" folder open up and displayed after
the move is made in this code which uses the name statement to move
and rename folders from backup folders to a work folder?

snip ....
Dim strFolderName As String, strPath1 As String, strPath2 As String
Dim intLoop As Integer
On Error Resume Next
strFolderName = InputBox("Enter Folder Name")
If Len(Trim(strFolderName)) > 0 Then
For intLoop = Asc("c") To Asc("z")
strPath1 = Chr$(intLoop) & ":\backup\" & "ab" &
strFolderName & "12"
strPath2 = Chr$(intLoop) & ":\work\" & strFolderName
If Err.Number = 52 Then GoTo skipDrive
Name strPath1 As strPath2
MsgBox "Success"
I thought shell might do it but how would it start Chr$(intLoop) &
":\work\ ?

jenn

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Giuseppe D'Elia | last post by:
Hi there, I got a problem using an MS Access database through ASP.NET. After updating my system from .NET Framework 1.0 to 1.1, my existing application gives me the following error when...
2
by: srik | last post by:
Dear All, I created a simple ASP.net web application on my desktop system, which has Windows XP as the Operating system. I then moved the ASP.net application to my server which has Windows...
2
by: Dan Sikorsky | last post by:
How can I stop the bin folder from automatically opening and showing all its contents upon startup, moving from project to project, etc.? It should only open when you click on it to expand it.
1
by: Ddraig | last post by:
Howdy, I was wondering if anyone could point me in the direction of some good code that will look at a folder of various text files, read in the names and then open them. For example opening...
4
by: Pieter | last post by:
Hi, From my VB.NET 2005 application I need to be able to open Files an Directory's with their default application: - A word-doc must open in word - A excell-document in Excel etc - in case...
18
by: mollyf | last post by:
I just installed SQL Server 2005 on my PC (the developer's edition) yesterday. I have some scripts written by one of my coworkers to create some tables and stored procedures in a database that...
2
by: Jl_G_0 | last post by:
Hey all. Got a weird problem here. I need to open a folder that is on a server. The asp.net page and the IIS are on the same server. But i Cant access it from nowhere but locally. Simply because...
7
devikacs
by: devikacs | last post by:
hi i'm not sure this is the right forum to post my question. Everytime i try to start mozilla firefox, i get a popup saying use IE and it closes. I tried removing firefox from add/remove programs,...
0
by: veer | last post by:
Hi i have a probleum in opening the access database which is on my LAN Networking with DAO. It is connecting and dispalaying the database name but when i use to open it, error displayed named"...
10
by: kimiraikkonen | last post by:
Hi, I have an app which has a listbox and when i double click an associated fileS, i want their paths to be added into listbox in my application. This code works good when i try to open a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
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
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,...

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.