thanks, Tom
your code works perfectly.
when import() is a function, res returns "false".
how about if the import() is a private sub, how could we let re
returns "false"?
res = application.run ( "Myworkbook.xls!import")
this seems it does not work, because res returns Nothing.
one more question, you said I can use the following codes if all sub i
same workbook,
res = Import()
delrow
delcol
sort
do you mean the following lines will work?
sub format()
res = Import()
if vartype(res) = vbBoolean then exit sub
Workbooks.Open res
delrow
delcol
sort
end sub
I will try.
appreciate your big help
--
xian
-----------------------------------------------------------------------
xiang's Profile:
http://www.excelforum.com/member.php...fo&userid=2948
View this thread:
http://www.excelforum.com/showthread.php?threadid=49207