每个...需要下一个帮助 [英] For each... next help needed

查看:98
本文介绍了每个...需要下一个帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于每个变体在ThisDocument中

[陈述]

下一个变体


以上代码我需要VBA扫描所有文件并找到每个 ''但是thisdocument什么都不工作整个故事有人有什么建议吗?


欢呼Blacbox

For Each variant In ThisDocument
[statements]
Next variant

for the above code i need VBA to scan all of the document and find each " '' " but "thisdocument" doesn''t work neither does "wholestory" anyone got any suggestions?

cheers Blacbox

推荐答案


For Each变种In ThisDocument

[陈述]

下一个变体


上面的代码我需要VBA扫描所有文件和找到每个 ''但是thisdocument什么都不工作整个故事有人有什么建议吗?


欢呼Blacbox
For Each variant In ThisDocument
[statements]
Next variant

for the above code i need VBA to scan all of the document and find each " '' " but "thisdocument" doesn''t work neither does "wholestory" anyone got any suggestions?

cheers Blacbox



也许你可以使用InStr(ThisDocument,"''" ;)

Hi, perhaps you could use InStr(ThisDocument, " '' ")



您好,也许您可​​以使用InStr(ThisDocument,"''")
Hi, perhaps you could use InStr(ThisDocument, " '' ")



鉴于For Each ...声明的性质,我认为这将是 Instr( variant ,"''")

Given the nature of the For Each... statement, I think that would be Instr(variant, " '' ").


谢谢,但是当我使用


x = InStr(1,ThisDocument,"''")

>
首先,如果我遗漏了它所需的1本文件作为开始,其次instr返回值0为什么?文中肯定有'。


有什么建议吗? cheeers


blackbox
thanks but when i use

x = InStr(1, ThisDocument, "''")

firstly if i leave out the 1 it takes "this document" as the start and secondly instr returns a value of 0 why? there definitely are '' in the text.

any suggestions? cheeers

blackbox


这篇关于每个...需要下一个帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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