LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Running program

Greg,
You can only Shell what is considered an executable; .exe, .bat, .com etc
So for a file like an Access DB, you would to use the path to the executable
and pass the fill name as a parameter and a work group file if security is
applied.

Shell """C:\Program Files\Microsoft Office\Office 2000\Office\MSACCESS.EXE""
""D:\Database\Test.mdb"" /user /wrkgrp ""D:\Database\Test Sec.mdw"""

Depending what you want to achieve, Automation or ADO are alternatives.

NickHK

"Greg" wrote in message
...
Hi

I am just wondering how to open a file using a commandbutton on my

userform.

I have tried the shell execute but it seems to be a error

here is what I have tried so far

Dim RetVal
RetVal = Shell("C:\darts\darts.mdb", vbMaximizedFocus)

it is saying it is a invalid proceedure call or argument

runtime 5 error

Thanks

Greg




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running a external Program MarkS Excel Programming 1 August 9th 06 08:25 AM
running a command button from a program Pete at Sappi Fine Paper[_2_] Excel Programming 7 May 5th 05 03:08 PM
A program running on different Excel Versions Ian Stanborough Excel Programming 3 January 15th 05 05:06 AM
Stop a VB program from running Soterro Excel Programming 4 December 5th 03 07:25 PM
Running Program on a Mac ibeetb Excel Programming 0 October 16th 03 01:47 PM


All times are GMT +1. The time now is 06:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"