<div class="msgheader">QUOTE:</div><div class="msgborder"><b>以下是引用<i>八月的梦游者</i>在2008-5-29 19:18:00的发言:</b><br/><p>一个小小的提议,调用代码里使用了两次自定义函数的调用,建议先赋值。</p><p>If 级别工资(str1, str2) <> 0 Then<br/> MsgBox str1 & "级" & str2 & "档的级别工资是:" & 级别工资(str1, str2) & "元。", 0 + 64, "恭喜发财 ^_^"<br/> End If<br/></p><p>题外话,从这个级别的数目来看就可以知道官僚系统的复杂性了。</p></div><p></p><p>谢谢八月版主,这样改对不对?</p><p>Sub test()<br/>Dim str, str1, str2 As String<br/>Dim j%<font style="BACKGROUND-COLOR: #2bd52b;">, k%<br/></font> str = InputBox("请输入级档", "查询", "27-1")<br/> j = InStr(1, str, "-", vbTextCompare)<br/> str1 = Left(str, j - 1)<br/> str2 = Right(str, Len(str) - j)<br/><font style="BACKGROUND-COLOR: #3cc472;"> k = 级别工资(str1, str2)<br/></font> If <font style="BACKGROUND-COLOR: #1ae642;">k </font><> 0 Then<br/> MsgBox str1 & "级" & str2 & "档的级别工资是:" & <font style="BACKGROUND-COLOR: #11ee11;">k </font>& "元。", 0 + 64, "恭喜发财 ^_^"<br/> End If<br/>End Sub<br/></p><p> </p><p>八月版主说得对,这个公务员的工资我是简单了表格才做到现在这个函数的,开始只能查表,而且还是许多许多过程不方便弄,所以,目前只有手动确实“级”“档”后,才用这个函数计算,自动计算往往会“没有这个级档”!</p>[em06]
[此贴子已经被作者于2008-5-30 10:49:31编辑过] |