Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 14th, 2005, 09:57 PM
Registered User
 
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Use VB to call Matlab to execute program

Im currently doing a reconition program that use Matlab to construct the main code and us VB as interface. for my program now, it can open the Matlab but after that it shown error and close the Matlab. below is the code in VB



'Set mfile directory name
initDirectory = App.Path & "\mFile\"

'Set mfile filename "start up file" here
startMfile = "Init.m"

'temporary storage before passing image to matlab
tempImage = directoryname & namaFail

Call bufferImage
     DoEvents

'string to pass to Matlab to run mFile from mfile directory
MatLabCommand = "run('" & initDirectory & startMfile & "')"

    Set Matlab = CreateObject("Matlab.Application")


'execute matlab command
                With Matlab
                        Visible = False
                        Result = .Execute(MatLabCommand)
                End With


    Call PlateNum


Hope that anyone can help me ont his matter. Thank you


best regards
fennsc






Similar Threads
Thread Thread Starter Forum Replies Last Post
Call VB exe in another vb program Swati Chari BOOK: ASP.NET Website Programming Problem-Design-Solution 1 March 14th, 2008 11:43 AM
load and call a vb.net program in memory jpwollman Pro Visual Basic 2005 1 October 25th, 2007 02:42 PM
call external program from vb.net praswani Pro VB.NET 2002/2003 2 October 18th, 2007 07:19 AM
Call VB Exe from VB Program jmss66 VB How-To 5 December 12th, 2004 11:17 AM
How to call a program in as400 through vb 6 gokul VB Databases Basics 0 October 20th, 2004 03:41 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.