This is very helpful. Thank you. I've been creating and running batch files from MapBasic in order to open up an Access or Excel application.
Thanks Andrew, Michael Hanna Industrial Engineering United Parcel Service Canada Ltd. (905) 660-8688 -----Original Message----- From: Canfield, Andrew [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 30, 2002 4:42 PM To: '[EMAIL PROTECTED]' Subject: MI-L Shell Excel from Within MapInfo using MapBasic This may be old news to you guys or not, however I'll post it because it took me so long to figure this out. Here is how you Start a windows program from MapInfo via Mapbasic. I need it to initiate DDE conversations with Excel therefore Excel must be running. I don't like starting excel then running my DDE conversation so here is how I start Excel with MapBasic. I am using MapBasic 6.5 and MapInfo 6.0 windows system is Win2000. ' --------------------------------------code---------------------------------- ----------------------------- Declare sub main Declare Function ShellExecute Lib "C:\WINNT\SYSTEM32\Shell32.dll" Alias "ShellExecuteA" ( ByVal hwnd As SmallInt, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As SmallInt) As SmallInt Sub Main Dim my_num As SmallInt my_num = ShellExecute( 0, "", "Excel","", "", 3) End Sub '------------------------------------end code-------------------------------------------------- Hope it's helpfull to someone. --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 2268
