It's great to see people get back with solutions Steve.
er.... what is the 3... ?
Lisa
Sent: Fri, Apr 13, 2012 1:10 am
Subject: [ExcelVBA] FYI: Using the Shell function in VBA
YI
dug a bit more and found that adding the full name (mode.com) as well as
roviding a receptacle for the Shell return value did the trick.
Except ... VBA continues before it finishes and will be used (asynchronous), so
here must either be a delay before "OPENing" the port, or using some more
ernel32 functions (ShellAndWait on the web), you can wait until it finishes:
Dim RetVal as Long
etVal = Shell(Environ("comspec") + " /c mode.com Com4:9600,n,8,2", 3)
The 3 is
Regards, Steve N.
[Non-text portions of this message have been removed]
__._,_.___
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
.
__,_._,___
Tidak ada komentar:
Posting Komentar