sub
chdir thisworkbook.path
workbooks.open filename:="ex.xls"
msgbox "close test.xls"
workbooks("ex.xls").close
end sub
=============
sub add_save_sheet()
dim rtn As integer
set newbook = workbooks.add
newbook.saveas filrname:="test.xls"
worksheets("sheet").range("a1") = 1000
rtn = msgbox("are you save file ?", vbyesno)
if rtn = vbyes then
newbook.save
end if
end sub
================
sub folder()
dim filepath as string
dim savefilename as string
set newbook = workbooks.add
filepath = application.path & "\data"
msgbox "excel 資料夾是" & application.path
mkdir filepath
msgbox "己建立資料夾" & filepath
savefilename = filename:=savefilename
msgbox "以下名稱己儲存" & savefilename
end sub
=================
               (
geocities.com/hk/bokuwa_dikikodesu)                   (
geocities.com/hk)