click on name, and open with windows explorer.
I tried using shell
(Code)
Shell "explorer.exe " & sPath & lstYellow.Value, vbNormalFocus
(/code)
sPath is a variable set earlier and is ok, but I need to get the file name out of lstYellow, and value is not a good property. I have tried selected, listindes and others, but I think I just need some help in formatting, as the code is not finding the file at all.
I had help in etting this up,
I am not even sure how the shell line is supposed to look for this.
but something like this
Shell "explorer.ext" & "c:\App\Yellow|" & "012345.bmp", vbNormalFocus
(I am thinking the spacing must be very important, and I am sure the file is there) The file name does not show quotes in the list box.
Any help will be appreciated.
Thanks
Ken
3 4576
click on name, and open with windows explorer.
I tried using shell
(Code)
Shell "explorer.exe " & sPath & lstYellow.Value, vbNormalFocus
(/code)
sPath is a variable set earlier and is ok, but I need to get the file name out of lstYellow, and value is not a good property. I have tried selected, listindes and others, but I think I just need some help in formatting, as the code is not finding the file at all.
I had help in etting this up,
I am not even sure how the shell line is supposed to look for this.
but something like this
Shell "explorer.ext" & "c:\App\Yellow|" & "012345.bmp", vbNormalFocus
(I am thinking the spacing must be very important, and I am sure the file is there) The file name does not show quotes in the list box.
Any help will be appreciated.
Thanks
Ken
The Shell() Function is used primarily to Run an executable File, but strangely enough can be used to Open other File Extensions when used in the manner in which you indicate. The code snippet below should point you in the right direction: -
Dim retVal As Variant, sPath As String
-
-
sPath = "C:\App\Yellow\"
-
-
'Where Me![lstYellow] = 012345.bmp
-
retVal = Shell("explorer.exe " & sPath & Me![lstYellow], vbNormalFocus)
ADzeii,
Thank you very much. I appreciate you taking the time .
Ken
ADzeii,
Thank you very much. I appreciate you taking the time .
Ken
You are quite welcome.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Martin |
last post by:
Again drawing on the groups experience:-
1. For general file opening and file saving, using VB6, are there any issues
with using the FileOpen and FileSave Common Dialog Boxes?
2. Is using the...
|
by: Andras Gilicz |
last post by:
Hi VB fans
I'm working on a relatively large project in VB6 with about a dozen
forms, including graphs, labels, text boxes, etc. The software itself
is actually a flow simulator with more or...
|
by: Paolo |
last post by:
Friends,
I have created a form with a list box that shows all my Word files.
I have then added the following code (found on comp.databases
newsgroup) to the Open event of my form and it works...
|
by: Light |
last post by:
Hi
I am a relatively inexperienced and I need help in this, what seems to
be a simple task
I am trying to read from a text file which contains a list of peoples
names in the format 'Surname...
|
by: Daniel Walzenbach |
last post by:
Hi,
Imagine the following situation: I have an asp.net
application which allows uploading files to a SQL Server
2000 database (Files are stored as type "images"). As a
next step I would like to...
|
by: colleen1980 |
last post by:
There are two continuous subforms in main form. All are linked with
ticketNum. When user comes to subform2. I need that Field3 of subform2
will automatically filled with field2 (field2 is a...
|
by: rn5a |
last post by:
Using the FileSystemInfo class, I am retrieving all the directories &
files existing in a particular directory on the server & listing them
in a ListBox. If an item in the ListBox happens to be a...
|
by: nottarealaddress |
last post by:
I'm trying to get my feet wet in VB2005 (our new standard at work
after officially stopping new development in VB6 about a month ago).
I'm working with a simple sql 2005 table of 50 entries, one...
|
by: Plumebee |
last post by:
Hi, I am very new to programming and have just started to use Visual Basic 2005 Express Edition. I am trying to read from a text file to draw a rectangles and lines. However to begin I'm trying to...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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...
|
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...
|
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,...
|
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,...
|
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...
|
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: 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,...
| |