百科狗-知识改变命运!
--

VBA中显示没有定义?

百变鹏仔11个月前 (12-02)阅读数 22#综合百科
文章标签原因第一个

这段代码看起来是用来批量修改Word文档的。它会打开一个Word应用程序,然后打开一个文档,使用 '.选择.查找对象的.Text和.Replacement.Text属性来替换文档中的文本。

具体来说,它会输入开始和结束的行号,然后从Excel的表格中提取每一行的数据。接着,它会复制一个文档,并在文件名后面添加当前行的数据。然后,它会打开这个新文档,使用 '.选择.查找对象替换文档中的指定文本,并保存文档。

这段代码中有一些问题。例如,它定义了一些常量和变量,但并没有使用它们。此外,它会打开一个Word应用程序,但并没有在使用完后关闭它,这可能会导致内存泄漏。

如果你想继续使用这段代码,建议你先清除没有用到的常量和变量,并在使用完Word应用程序后关闭它,以免造成内存泄漏。

Sub Wordexamination_Click()

Const strRemote_Path1 = "C:\other\A\"

Const strRemote_FileName1 = "word"

Const strRemote_Path2 = "C:\other\B\"

Dim Wordexamination As New Wordexamination.Application

Dim i, j

strRemote_Path1 = ThisWorkbook.Path

B = InputBox("擖椡奂峦岘", "侥僗僩侾")

c = InputBox("擖椡廔椆岘", "侥僗僩俀")

HANDAN = 0

For i = B To c

strRemote_FileName1 = "AAA"

FileCopy strRemote_Path1 & "\AAA.doc", strRemote_Path1 & "\" & strRemote_FileName1 & "(" & Sheets("BBB").Range("c" & i) & ").doc"

strRemote_Path2 = strRemote_Path1 & "\" & strRemote_FileName1 & "(" & Sheets("BBB").Range("c" & i) & ").doc"

With Wordexamination

.Documents.Open strRemote_Path2

.Visible = False

With .Selection.Find

For x = 7 To 1 Step -1

Str1 = "100" & Format(x, "000")

Str2 = Sheets("BBB").Cells(i, x)

.Text = Str1

.Replacement.Text = Str2

.Execute Replace:=wdReplaceAll

Next x

End With

.Selection.WholeStory

.Selection.Font.Color = wdColorAutomatic

End With

Wordexamination.Documents.Save

Next i

Wordexamination.Quit

VBA中显示没有定义?

Set Wordexamination = Nothing

If HANDAN = 0 Then

i = MsgBox("涍?弌摓 Word 暥审両", 0 + 48 + 256 + 0, "采帵丗")

End If

End Sub

全国英语等级考试写作作文模板

 引导语:下面我为大家整理了全国英语等级考试写作作文模板,希望能够帮助到您,谢谢您的阅读,祝您阅读愉快。

  模板一

 agree or disagree

 Nowadays, some may hold the opinion that ____________________. But others have a negative attitude. As far as I am concerned, I agree that ____________. My arguments for this point are listed as follows.

 I agree with the statement that ______________________without reservation since ________________.

 Another reason why I agree with the above statement is that I believe that________________.

 In a word, _________________________. Taking into account of all these factors, we may reach the conclusion that__________.

 模板二

 题目给出1样问题,要求考生说明对它的样人意见并给出理由。

 1.TOPIC:...X...What do you think about it? Give specific reasons and examples to illustrate your answer.

 ?.. There are numerous approaches to solving XXX/(analyzing the impacts on XXX/the characteristics of XXX), and l will explore the most conspicuous ones here.

 One of the primary methods/impacts/characteristics is (2).

 A more subtle point which we must consider is that (3).

 In addition, (4).

 Taking into account of all these methods/effects/aspects, we may reach the conclusion that (5).

 注:(1)背景描述。

 (2)XXX的第1样方面。

 (3)XXX的第二样方面。

 (4)XXX的第三样方面。

 (5)总结观点。

 2.?. Among countless factors which contribute to XXX, three conspicuous aspects are as follows.

 One of the primary causes is that (2).

 XXX also results from (3).

 (4) is responsible for XXX, as well.

 I draw the conclusion that A, B and C are three main contributors to XXX.

 注:(1)陈述这样事实。

 (2)XXX的第1样原因。

 (3)XXX的第二样原因。

 (4)XXX的第三样原因。

模板三

 Some people hold the opinion that A is superior to B in many ways. Others, however, contradict A. Personally, I would prefer ① because I think A has more advantages. There are numerous reasons why ② , and I would in here explain a few of the most important ones.

 The main reason is that ③ . It can be given a concrete example ④ .

 Another reason why I advocate the attitude of A is that ⑤ . Take the case of a thing that ⑥ .

 One very strong argument for A is that ⑦ . This demonstrates the undeniable fact that ⑧ .Of course, choosing B also has advantages to some extent, ⑨ .But if all these factors are contemplated, the advantages of A carry more weight than those of B.

 From what has been discussed above, we may finally draw the conclusion that ⑩ .

 ①表明自己的观点:赞同A②此处填入赞同A的句子③赞同A的原因之一④举例说明原因之一⑤赞同A的原因之二⑥举例说明原因之二⑦举例说明原因之三⑧表明A 的优势⑨列出B的1-2个优势⑩总结观点

 No doubt, I choose A, because there are too many benefits that outnumber its disadvantages not to choose it. But B, on the other hand, has advantages no more than its disadvantages.

 The most important benefit of A is that① .

 Another benefit of A, which B almost cannot achieve, is that③ .Although B also has its seemingly profound advantages, it can be only achieved conditionally because④ .

 After understanding the reasoning above, it is quite safe now to say that to choose A is a wise action.

 ①A能带来的第一个好处② B带来的坏处比如:浪费很多东西,如时间,金钱等③A能带来的第二个好处④B的局限性

 模板四

 单一观点式: 给出一个论点,此论点不包括两种事物的比较,要求考生支持或反对并给出理由。

 Agree:

 The title statement is the focus in these days and any speech about it would surely strike the top lines of most newspapers. To agree or disagree with it is a matter of balancing between its pros and cons. But if one has considered the following perspectives, he/she could only agree with the title statement as I do.

 As we know, firstly, ① . A small example could give some light to this point. It is said that ②.

 Under some circumstances, the deviation of AAA would be potentially harmful, or at least, unpredictable in its results. For instance, ③ . I illustrate this extreme example just in an attempt to state one thing clearly: ④ .

 Last but not least, ⑤ . In order to see this point clearly, let us see an example: ⑥ .

 So, based on the above discussion, I agree with the opinion that ⑦ .

 给出一个论点,主要是对两个事物进行比较的陈述,要求考生支持或反对并给出理由。(D)

 具体表述如下:

 TOPIC: A is superior to B in DONG C. Do you agree or disagree with this statement? Use specific reasons to support your point of view

 disagree

 I completely disagree with this statement that choosing A has more advantages than choosing B. And I would like to present two explanations to confirm you that I am right.

 First of all, ① . Generally, ② . Let me give you an example: ③ . Thus, proving my point, ④ .

 The second thing that must be taken into consideration when choosing A or B is that ⑤ . As I have said, ⑥ .

 Finally, the point I am trying to make is that it is not better to choose A than choose B in that ⑦ .In sum, ⑧ .

 ①支持B的第一个原因②进一步阐述支持B的原因③举例说明原因之一④填入一句支持B的句子⑤支持B的第二原因⑥进一步阐述支持B的`第二原因⑦支持B的第三 个原因⑧总结观点

 This controversy describes the dilemma faced by many people. In my opinion, I agree with the above statement that A is superior than B in ?.

 It is an obvious fact that ① . For example, ② .

 Perhaps another reason why A is superior to B lies in the fact that ③ . An example to show this can be found in the story that ④ .

 Let?s bring our discussion here to a more present and practical context. In today?s world, ⑤ . This may explain why A is better than B. On the other hand, a common sense goes that ⑥ .

 We can conclude from the foregoing reasons and examples that ⑦ .

 ①赞同A比B好的第一个原因②举例说明原因之一③A比B好的第二原因④举例说明永远之二⑤再举一个事例进行说明⑥B的劣势⑦总结观点

 ①支持AAA的第一个原因② 举例说明原因之一③ 举一事例④支持AAA的第二原因⑤支持AAA的第三原因⑥举例说明原因之三⑦重申观点

 模板五

 disagree

 This problem is a much debated one in that it affects everybody in their daily lives. People may prefer one to another, although some have no opinion about it. But if I am concerned, I can only disagree with the title statement and the reasons are given below.

 With reference to ① , the reason why I disagree with AAA is that ② .

 Second, because ③ , ? . As a result, ④ .

 Finally, ⑤ .

 Again, I would state my objection to this issue after analyzing the three reasons. ⑥ .

 反对AAA的一个侧面②反对AAA的第一个原因③反对AAA的第二个原因④ 原因之二造成的后果⑤ 反对AAA的第三个原因,并举例说明⑥总结观点

 模板六

 It seems, in so many items, very difficult to prefer one to another because all of them have their advantages and disadvantages to the extent that it is hard to distinguish. Yet that does not mean they are of the same to me. To be frank, I would prefer A if personal preference is considered as a criterion to choose things.

 Firstly, I like it because it can ① , thus make me ② .

 There?s another reason why I choose A, in terms of ③ , ④ . No wonder, it again brings me convenience that I cannot get if I choose any one of the others.

 That last reason is that ⑤ .

 In conclusion, everybody wants to choose the one that fits him/her. So, it is of great benefits of me to choose ⑥ .

 ①支持A的第一个原因②它所带来的好处③一个侧面④支持A的第二个原因⑤支持A的第三个原因⑥重申观点

;
内容声明:本文中引用的各种信息及资料(包括但不限于文字、数据、图表及超链接等)均来源于该信息及资料的相关主体(包括但不限于公司、媒体、协会等机构)的官方网站或公开发表的信息。部分内容参考包括:(百度百科,百度知道,头条百科,中国民法典,刑法,牛津词典,新华词典,汉语词典,国家院校,科普平台)等数据,内容仅供参考使用,不准确地方联系删除处理!本站为非盈利性质站点,本着为中国教育事业出一份力,发布内容不收取任何费用也不接任何广告!)