sub exportexcelcsv() dim strout as string dim tbl as accessobject dim f as boolean with application.filedialog(4) ' msofiledialogfolderpicker .title = "please select the target folder" if .show then strout = .selecteditems(1) if not right(strout, 1) = "\" then strout = strout & "\" end if else msgbox "you didn't select a target folder.", vbexclamation exit sub end if end with f = (msgbox("do you want to export all tables to excel (no = csv)?", _ vbquestion vbyesno) = vbyes) for each tbl in currentdata.alltables if not tbl.name like "msys*" and not tbl.name like "~" then if f then docmd.transferspreadsheet acexport, acspreadsheettypeexcel12xml, _ tbl.name, strout & tbl.name & ".xlsx", true else docmd.transfertext acexportdelim, , _ tbl.name, strout & tbl.name & ".csv", true end if end if next tbl end sub
用户登录
还没有账号?立即注册
用户注册
投稿取消
文章分类: |
|
还能输入300字

上传中....