A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

VB Command



 
 
Thread Tools Display Modes
  #1  
Old March 24th, 2010, 10:30 PM posted to microsoft.public.access
Léon Hajduk
external usenet poster
 
Posts: 2
Default VB Command


"Léon Hajduk" a écrit dans le message de news:...

"Jasper Recto" a écrit dans le message de
...
I have a button that runs the function below. It opens an excel document.
I also have other funtion that opens up other documents whether it be a
word or pdf docuement.

This command opens each document in an explorer window.

How can I make a generic command that will open up the file in its native
program. That way an excel file will open in excel, etc...

Thanks,
Jasper



Function Administration()
Dim MyPath As String
Dim Word

MyPath = "\\LocFile\Departments\Quality
Control\Public\ISO-TS16949\ADMINISTRATION INDEX.xls\"
Word = Shell("Explorer.exe " & MyPath & """", 1)

End Function



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:53 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.