Is this possible

rgreene

Registered User.
Local time
Today, 15:31
Joined
Jan 22, 2002
Messages
168
Hi All,

I have a inventory database that I (with a lot of your guys' help) created. We us it to track our computers, hardware, software, users etc. We have Dell computers and one of our fields is the Dell service tag. We are very archaic when it comes to remote access (if you can call it that). What we do is do the Start, run \\tagid\c$ thing. We were saying it would be nice if since we are in the database looking up the tag number if we had a button to click that would automatically attach us to that computer. So if I'm on record 15PBV21 I click a button and it automatically does the start, run \\15PBV21\c$ command. It would have to be flexible and use the tag from which ever record we are on.

If you follow me. Is this even possible. If so can someone help point in the right direction to get started.

thanks,
Rick
 
Try this...

Code:
Dim Explorer As String
Dim Location As String

Explorer = "C:\Windows\Explorer.exe /N,/E,"
Location = "\\15PBV21\c$"

Call Shell(Explorer & Location, vbMaximizedFocus)
Substitute the Location string with the name of your text box.
 
Not sure what you mean "Substitute the Location string with the name of your text box" my text box name is "text11" the control source is "Hardware Table.ServiceTag#"

Getting:

Runtime error 53
File not found error
 
Code:
Dim Explorer As String

Explorer = "C:\Windows\Explorer.exe /N,/E,"
Location = Me.[text11] 'naming conventions are a must ie: txtServiceTag

msgbox Explorer & Location 'for testing the string
Call Shell(Explorer & Location, vbMaximizedFocus)
The msgbox will display the string that is being passed to the Shell command. Assuming the value in the text11 text box is "\\15PBV21\c$" then the message box should display something like this... C:\Windows\Explorer.exe /N,/E,\\15PBV21\c$

Also, is the Explorer.exe file located @ C:\Windows\ on your PC? If not, find it and adjust the code.
 
This is AWESOME!!! Thanks for the help it's working great.

Just out of curiousity what does the /N,/E, at the end of the explorer.exe line do?
 
rgreene said:
This is AWESOME!!! Thanks for the help it's working great.

Just out of curiousity what does the /N,/E, at the end of the explorer.exe line do?
Your welcome.

The /N,/E switches create the double paned window. The double pane window is more versitale compared to a single pane explorer window.
 

Users who are viewing this thread

Back
Top Bottom