|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
<p class="MsoNormal" align="left" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan;"><span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA;">各位大大和高手,小弟初来乍到,对宏和VB脚本一窍不通。又有急用,所以来这求救了。希望各位大大高手帮我搞定,感激不尽!</span></span></p><p class="MsoNormal" align="left" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan;"><span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA;"></span></span> </p><p class="MsoNormal" align="left" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan;"><span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA;">“</span><span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA;">附件一-原表<span lang="EN-US">”</span>是别人的模板, <span lang="EN-US">“</span>附件二-新表<span lang="EN-US">”</span>是目前预期想要的表面状态。</span></span></p><p class="MsoNormal" align="left" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan;"><span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;"><span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA;"></span><strong>目前我的问题:<span lang="EN-US"><p></p></span></strong></span></p><p class="MsoNormal" align="left" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-char-indent-count: 2.0;"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;"><span style="mso-spacerun: yes;"> </span>1</span><span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;">、在原表的第一张工作表<span lang="EN-US">“</span>凭证<span lang="EN-US">”</span>的下面凭证<span style="COLOR: fuchsia;">主要内容的几个项目后增加 <span lang="EN-US"><p></p></span></span></span></p><p class="MsoNormal" align="left" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan;"><span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;">“部门编码”“个人编码”<span style="COLOR: fuchsia;">这两个内容</span>。见新表中第一张工作表<span lang="EN-US">“</span>凭证<span lang="EN-US">”</span>中的位置。<span lang="EN-US"><p></p></span></span></p><p class="MsoNormal" align="left" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-char-indent-count: 2.0;"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;">2</span><span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;">、本表包含两个“宏”设置,第一个宏是“初始设置”,第二个宏是“生成凭证”,这两个宏的执行是通过点击第二张工作表“设置” 中的两个按钮“初始设置”、 “生成凭证”。<span lang="EN-US"><p></p></span></span></p><p class="MsoNormal" align="left" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-char-indent-count: 2.0;"><span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;">第一个宏“初始设置”主要作用是恢复到了输入初始状态。在这里<span style="COLOR: fuchsia;">需求就是对第一个宏进行修改,修改后点击“初始设置”按钮运行后,第一张工作表<span lang="EN-US">“</span>凭证<span lang="EN-US">”</span>上恢复到增加了<span lang="EN-US">“</span>部门编码、个人编码<span lang="EN-US">”</span>这个时候。如新表的第一张工作表<span lang="EN-US">“</span>凭证<span lang="EN-US">”</span>状态(即不要那两行测试数据)。</span><span lang="EN-US"><p></p></span></span></p><p class="MsoNormal" align="left" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-char-indent-count: 2.0;"><span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;">第二个宏 “生成凭证”是核心内容,将第一张工作表“凭证”上面所填写的内容进行运算,导出到生成到第三张工作表<span lang="EN-US">“</span>导出<span lang="EN-US">”</span>这样格式的文字串信息。这里的信息占到文本文件就是可以导入到<span lang="EN-US">UF</span>总账的标准格式。<span lang="EN-US"><p></p></span></span></p><p class="MsoNormal" align="left" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan;"><span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;">每行数据生成是凭证的一行,这里每行用逗号隔开的,如:</span></p><span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;"><p class="MsoNormal" align="left" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-char-indent-count: 2.0;"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;">"2007-8-28","</span><span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;">转<span lang="EN-US">","1",1,"</span>测试凭证<span lang="EN-US">","171",100,,,,,"",,,"2007-8-28",,,"",,,"",<p></p></span></span></p><p class="MsoNormal" align="left" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan;">我暂时将两逗号中间的数据叫做<span lang="EN-US">1</span>段,那么生成的导出信息有关凭证分录的行(即例第二行、第三行),每行共<span lang="EN-US">21</span>段。<span lang="EN-US"><p></p></span></p></span><p class="MsoNormal" align="left" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan;"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;"><span style="mso-spacerun: yes;"> </span><span style="COLOR: fuchsia;"><span style="mso-spacerun: yes;"> </span></span></span><span style="FONT-SIZE: 12pt; COLOR: fuchsia; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;">在这里需求就是将添加的“</span><span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;">部门编码”、“个人编码”<span style="COLOR: fuchsia;">两个项目,要和前面的几个数据一样,经过宏转换,将每行填入的相关数据编辑进去。</span>这两个编码数据,在<span lang="EN-US">21</span>段里面占据的位子是:部门编码是第<span lang="EN-US">16</span>段,个人编码是第<span lang="EN-US">17</span>段。也就是如上例中<span lang="EN-US">21</span>段式的:第<span lang="EN-US">16</span>、<span lang="EN-US">17</span>段也就是在第二个<span lang="EN-US">"2007-8-28",</span>后面的那两段。<span lang="EN-US" style="COLOR: fuchsia;"><p></p></span></span></p><p class="MsoNormal" align="left" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan;"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;">3</span><span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;">、将文件里面锁定单元格的密码破解掉。嘿嘿<span lang="EN-US"><p></p></span></span></p>
DuKR4Gbb.rar
(46.69 KB, 下载次数: 129)
<br/> |
|