<p><font color="#f70909" size="7">只支持单行录入,希望高手能帮忙完善成多行同时过账。</font></p><p></p><p>psw=1</p><p>qq4 6 7 0 1 2 8 7,</p><p> </p><p></p><p></p><p></p><p>付关键代码:</p><p>If Range("p3").Value = "商品入库单" Then<br/> Cells(j, k).Value = Cells(j, k).Value + Cells(5, 9).Value</p><p> Call ad_data<br/> Cells(5, 9).Value = ""<br/> MsgBox "入库单已经过帐~!请进行下一笔.", vbOKOnly<br/>Else</p><p> <br/> If Cells(5, 5).Value < Cells(5, 9).Value Then<br/> MsgBox "步贤提示:库存不足!!!请输入小于库存的数量,并及时补货!", vbOKOnly<br/> Range("i5").Select<br/> <br/> Exit Sub<br/>Else<br/> If Range("p3").Value = "商品销售单" Then<br/> <br/> Cells(j, k).Value = Cells(j, k).Value - Cells(5, 9).Value</p><p> <br/> <br/> Call ad_dataxs<br/> Cells(5, 9).Value = ""<br/> MsgBox "销售单已经过帐~!请进行下一笔.", vbOKOnly<br/>Else</p><p>If Range("p3").Value = "商品退货单" Then<br/> <br/> Cells(j, k).Value = Cells(j, k).Value - Cells(5, 9).Value</p><p> <br/> <br/> Call ad_datath<br/> Cells(5, 9).Value = ""<br/> MsgBox "退货单已经过帐~!请进行下一笔.", vbOKOnly<br/> <br/>End If<br/>End If<br/>End If<br/>End If<br/> If Cells(j, k).Value = 0 Then<br/> Cells(j, k).Clear<br/> End If</p><p></p><p> End Sub<br/>希望能多做几个像第五行那样几行能够同时过账。</p><p>第五行填入 货品 颜色 尺码</p><p><table cellspacing="0" cellpadding="0" width="266" border="0" style="WIDTH: 200pt; BORDER-COLLAPSE: collapse;"><colgroup><col width="92" style="WIDTH: 69pt; mso-width-source: userset; mso-width-alt: 2944;"></col><col></col><col width="108" style="WIDTH: 81pt; mso-width-source: userset; mso-width-alt: 3456;"></col><col></col><col span="2" width="33" style="WIDTH: 25pt; mso-width-source: userset; mso-width-alt: 1056;"></col><col></col></colgroup><tbody><tr height="60" style="HEIGHT: 45pt; mso-height-source: userset;"><td class="xl67" width="92" height="60" style="BORDER-RIGHT: blue 2pt double; BORDER-TOP: #ece9d8; BORDER-LEFT: blue 2pt double; WIDTH: 69pt; BORDER-BOTTOM: blue 2pt double; HEIGHT: 45pt; BACKGROUND-COLOR: transparent;"><font face="楷体_GB2312" color="#ff0000" size="5"><strong>try</strong></font></td><td class="xl66" width="108" style="BORDER-RIGHT: blue 2pt double; BORDER-TOP: #ece9d8; BORDER-LEFT: blue; WIDTH: 81pt; BORDER-BOTTOM: blue 2pt double; BACKGROUND-COLOR: transparent;"><strong><font face="楷体_GB2312" color="#ff0000" size="5">黑色</font></strong></td><td class="xl68" width="66" colspan="2" style="BORDER-RIGHT: blue 2pt double; BORDER-TOP: #ece9d8; BORDER-LEFT: blue; WIDTH: 50pt; BORDER-BOTTOM: blue 2pt double; BACKGROUND-COLOR: transparent;"><strong><font face="楷体_GB2312" color="#ff0000" size="5">38</font></strong></td></tr></tbody></table></p><p>能够自动出来库存。</p><p>然后填入数量过账即可。</p><p>但多行并行执行以上代码好像太困难<br/></p>
[此贴子已经被作者于2009-11-1 11:02:29编辑过] |