VBA Excel工作簿RefreshAll之后带有参数 [英] VBA excel Workbook RefreshAll with parameter afterwards

查看:55
本文介绍了VBA Excel工作簿RefreshAll之后带有参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用RefreshAll方法更新excelsheet,问题是表单随后要求我提供日期才能更新.

此示例请求参数的示例:

在连接属性的定义"选项卡下,我们可以定义在哪里可以找到参数.点击参数".

然后我们将日期"更改为从单元格获取值"(我也希望更改时自动刷新选项):

I'm trying to update an excelsheet by using the RefreshAll method, problem is that afterwards the sheet asks me for a date before it can update.The parameter box picture (in dutch)

I don't have any rights on the server so I can't change anything there, only in the excel file itself.

I was hoping not having to use the sendkeys class, but at this moment I don't really know another solution?

Thanks

解决方案

It's possible that someone put a user input parameter into the query. If we look at an example workbook connection, such as below, we can click "Properties" and explore the query.

Example of parameter being requested for this example:

Under connection properties "Definition" tab we can define where to find the parameters. Click "parameters".

And then we change "date" to "Get value from cell" (I prefer the refresh automatically on change option too):

这篇关于VBA Excel工作簿RefreshAll之后带有参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆