发布网友 发布时间:2022-05-01 13:25
共1个回答
热心网友 时间:2023-10-14 22:54
sub 拆分工作簿 ( ) dim fd as filedialog,path as string ,sht as worksheet set fd=application.filedialog(msofiledialogfolderpicker) if fd.show=-1 then path= fd.selectionitems(1)&iff(right(fd.selecteditems(1),1)="\","","\") else :exit sub end iffor each sht in sheetssht.copyactiveworkbook.saveas path&sht.name,xlworkbookdefaultactivework.closenext shtend sub热心网友 时间:2023-10-14 22:54
sub 拆分工作簿 ( ) dim fd as filedialog,path as string ,sht as worksheet set fd=application.filedialog(msofiledialogfolderpicker) if fd.show=-1 then path= fd.selectionitems(1)&iff(right(fd.selecteditems(1),1)="\","","\") else :exit sub end iffor each sht in sheetssht.copyactiveworkbook.saveas path&sht.name,xlworkbookdefaultactivework.closenext shtend sub