从Access到Excel中提取查询,选择文件夹和文件名 [英] Extract Query from Access to Excel with abillity to Select Folder and Filename
本文介绍了从Access到Excel中提取查询,选择文件夹和文件名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我大约一周进入VB / VBA。我正在构建一个Access数据库,多个用户将使用它来导入报告,然后我有一个宏重新格式化它并将其保存到文件中。
但是,许多用户将使用数据库 - 所以我想知道如何导出让用户能够选择特定路径,特定文件名或两者。我有代码做提取 - 并保存到路径,但我似乎无法让他们一起工作。这是我的最后一次迭代:
Hi,
I am about a week into VB/VBA. I am building an Access database that multiple users will use to import a report into, and then I have a macro re-format it and save it to a file.
However, many users will be using the DB - so I was wondering how to export giving the user the ability to either select a Specific Path, a Specific File Name, or both. I have code to do extract - and to save to path, but I can''t seem to get them to work together. This is my last iteration:
展开 | 选择 | Wrap | 行号
推荐答案
这可能,还是有另一种实现相同结果的方法是?
Is this possible, or is there another way of achieving same results?
您将为文件的合格路径构建字符串,例如:
You would build the String for the Qualified Path to the File, such as:
展开 | 选择 | Wrap | 行号
ADezii - 非常感谢,这太棒了!
我将.txt更新为.csv,它正在获得我正在寻找的结果。但是,我有两个问题:
1.)有没有办法提示用户保存文件以便命名?
2.)它似乎在提取到文件夹时有效,但不是桌面 - 这是正确的吗?
非常感谢!
Mike
ADezii - Thanks so much, this is great!
I updated the .txt to .csv and it is getting the results I am looking for. However, I have two questions:
1.)Is there a way to prompt the user to Save the File so they can name it?
2.)It seems to work when extracted to folders, but not desktop - is this correct?
Thanks so much!
Mike
这篇关于从Access到Excel中提取查询,选择文件夹和文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文