24h購物| | PChome| 登入
2008-06-05 15:08:30| 人氣134| 回應0 | 上一篇 | 下一篇

VB估價單

推薦 0 收藏 0 轉貼0 訂閱站台

Dim Total As Long
Private Sub cmdCalculate_Click()
Total = 0
Select Case cboCPU.ListIndex
Case 0
Total = Total + 2200
Case 1
Total = Total + 5800
Case 2
Total = Total + 7500
Case 3
Total = Total + 3250
Case Else
MsgBox ”CPU未選,請確認!”, vbInformation, ”請確認”
End Select
Select Case cboMainBoard.ListIndex
Case 0
Total = Total + 4750
Case 1
Total = Total + 3750
Case 2
Total = Total + 3650
Case 3
Total = Total + 3350
Case Else
MsgBox ”主機板未選,請確認!”, vbInformation, ”請確認”
End Select
If optRAM(0).Value = True Then Total = Total + 1250
If optRAM(1).Value = True Then Total = Total + 2000
If optRAM(2).Value = True Then Total = Total + 4100

If optMonitor(0).Value = True Then Total = Total + 4500
If optMonitor(1).Value = True Then Total = Total + 9300
If optMonitor(2).Value = True Then Total = Total + 15500

If optCDROM(0).Value = True Then Total = Total + 1500
If optCDROM(1).Value = True Then Total = Total + 1900
If optCDROM(2).Value = True Then Total = Total + 2400

If optHDD(0).Value = True Then Total = Total + 3500
If optHDD(1).Value = True Then Total = Total + 3700
If optHDD(2).Value = True Then Total = Total + 4200

If optPrinter(0).Value = True Then Total = Total + 5700
If optPrinter(1).Value = True Then Total = Total + 6200
If optPrinter(2).Value = True Then Total = Total + 10500

If chkModem.Value = True Then Total = Total + 1950
If chkDVD.Value = True Then Total = Total + 4200

If chkDIY.Value = False Then Total = Total + 1500

lblTotal = Total
End Sub

Private Sub Form_Load()
cboCPU.AddItem ”Pentium III-300”
cboCPU.AddItem ”Pentium III-350”
cboCPU.AddItem ”Pentium III-400”
cboCPU.AddItem ”K6-2 400”

cboMainBoard.AddItem ”ASUS”
cboMainBoard.AddItem ”GIGA”
cboMainBoard.AddItem ”SOYO”
cboMainBoard.AddItem ”Aopen”
End Sub

台長: 楓落無情
人氣(134) | 回應(0)| 推薦 (0)| 收藏 (0)| 轉寄
全站分類: 不分類 | 個人分類: 生活瑣事 |
此分類下一篇:15樣一般人不會知道的事
此分類上一篇:非常重要..快進來看

是 (若未登入"個人新聞台帳號"則看不到回覆唷!)
* 請輸入識別碼:
請輸入圖片中算式的結果(可能為0) 
(有*為必填)
TOP
詳全文