Excel VBA 跨域文件复制
这是一个与我之前的问题几乎相似的问题,但是我之前的问题是在 VB.NET 中,现在我需要在 Excel VBA 中执行相同的操作。
基本上,我有一个在 Windows 域中的服务器上自动生成的文件,例如,称为“prod”,我需要使用 VBA 将该文件传输到另一个 Windows 域中的另一台服务器,例如“QA” ,其中 QA 和 Prod 完全具有不同的凭据,每次打开目标文件夹时我都必须验证该凭据。
因此,我想常规的文件复制方法行不通,是否有其他方法可以实现此目的?
谢谢!
PS 这是我上一个问题的链接,不确定是否有帮助:
Here is a question that is almost similar to my previous question here, however my previous question was in VB.NET and now I will need to do the same in Excel VBA.
Basically, I have a file that is being generated automatically on a server in a Windows domain, say, called, "prod" and I will need to have VBA to transmit this file to another server in another Windows domain, say, "QA", where QA and Prod have different credentials altogether and I have to authenticate that credential every time I opened up the destination folder.
Therefore, I guess the regular filecopy method would not work, is there another way where we can accomplish this?
Thanks!
P.S. Here is the link to my previous question, not sure if it would help:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该能够使用转换为 VBA 的 VB.NET 解决方案,
例如 LogonUser 函数声明类似于
you should be able to use your VB.NET solution translated to VBA
eg the LogonUser function declaration would be somethong like