Excel宏 - 行延续太多 [英] Excel macros - Too many line continuations

查看:160
本文介绍了Excel宏 - 行延续太多的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个大SQL查询(如200行)...

I have a "large" SQL query (like 200 lines)...

dim query as string
query = "..................................." & _
        "..................................." & _
           .... Like a lot lines later...
        "..................................."

function query,"sheet 1"

当我这样做,Excel说太多行延续。

When I do this, Excel says "Too many line continuations."

什么是避免这种情况的最佳方法?

What is the best way to avoid this?

推荐答案

只有一种方法 - 使用较少的延续。

There's only one way -- to use less continuations.

这可以通过将更多的文本放在一行或使用不同的表达方式来实现:

This can be done by putting more text on a line or by using concatenation expressed differently:

query = ".........."
query = query & ".........."
query = query & ".........."

但最好是加载文本作为一个整体的外部来源。

But the best is to load the text from an external source, as a whole.

这篇关于Excel宏 - 行延续太多的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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