導航:首頁 > 匯率傭金 > VB編程匯率兌換

VB編程匯率兌換

發布時間:2021-04-04 14:20:45

❶ 用VB做匯率的問題

從上到下的3個文本框的name為text1,text2,text3.
Private Sub Command1_Click()
Dim usd As Single
Dim rmb As Single
Dim huilv As Single '這是定義的匯率
huilv = Val(Text1.Text)
usd = Val(Text2.Text)
rmb = usd * huilv
Text3.Text = Str(rmb)
End Sub

❷ vb6.0 人民幣與美元互相兌換 代碼是什麼

PrivateSubCommand1_Click()
Text1.Text=Val(Text3.Text)/Val(Text2.Text)
EndSub
PrivateSubCommand2_Click()
Text3.Text=Val(Text1.Text)*Val(Text2.Text)
EndSub
PrivateSubCommand3_Click()
Text3.Text=""
Text1.Text=""
Text2.Text=""
EndSub
PrivateSubCommand4_Click()
End
EndSub

❸ 用vb編寫 人民幣匯率

保存下面的代碼到一個後綴名為FRM的文件中,再用VB打開即可。
============
VERSION 5.00
Begin VB.Form Form1
Caption = "人民幣轉換工具"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口預設
Begin VB.OptionButton Option1
Caption = "轉換成歐元"
Height = 495
Index = 3
Left = 1680
TabIndex = 4
Top = 1200
Width = 1335
End
Begin VB.OptionButton Option1
Caption = "轉換成日元"
Height = 495
Index = 2
Left = 240
TabIndex = 3
Top = 1200
Width = 1215
End
Begin VB.OptionButton Option1
Caption = $"Form2.frx":0000
Height = 495
Index = 1
Left = 1680
TabIndex = 2
Top = 720
Width = 1335
End
Begin VB.OptionButton Option1
Caption = "轉換成美元"
Height = 495
Index = 0
Left = 240
TabIndex = 1
Top = 720
Width = 1215
End
Begin VB.TextBox Text1
Height = 375
Left = 240
TabIndex = 0
Top = 120
Width = 1455
End
Begin VB.Label Label1
Height = 375
Left = 480
TabIndex = 5
Top = 1800
Width = 3015
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Option1_Click(Index As Integer)
Dim t As Single
t = Val(Text1.Text)
Label1.Caption = FormatNumber(Choose(Index + 1, t / 7.7, t / 15.47, t / 0.081, t / 10.8), , vbTrue)

End Sub

❹ 怎樣用VB編寫人民幣與美元兌換程序

「美元到人民幣」按鈕的click事件代碼:
my
=
val(text3)
rmb
=
my
*
val(text2)
text1
=
rmb
其中:「兌換比率」輸入的是一美元兌換的人民幣值

❺ VB編程美元兌換人民幣代碼

private sub command1_click()
dim m as single,r as single,h as single
m=val(text1.text) '美元數量
h=8.099 '匯率
r=m*h '換算
label1.caption=Format (r, "#.##") '顯示兌換的人民幣數量
end sub

❻ 用VB編寫一款貨幣轉換程序

擺渡知道很廉價,樓上的就不要抱怨了。反正俺只是看看,樂樂罷了。

❼ vb程序 人民幣與英鎊的轉換

dim rmb as single
dim yb as single
dim hl as single'匯率
hl=1/12'匯率,自己設置吧
yb=rmb/hl'英=人民幣除以匯率

❽ vb的匯率轉換

類型不匹配(錯誤 13)
當前 Visual Basic為了完成數據類型的賦值,能夠對許多數值進行轉換,而較早的版本則做不到。然而,此錯誤仍可能發生並且有幾種原因和解決方法。

現在需要搞清楚,這個賦值式是想做字元串拼接還是是數字增加。

❾ vb的匯率轉換問題

Label2.Caption & "壹"

....
代碼沒必要寫那麼長。用mid的特性,簡化代碼

❿ 求VB編程:貨幣兌換,輸入人民幣,兌換成美元,比例1:8.25

有的地方沒說清楚
大概寫了下

界面格式如下:

label1 [text1] label2 option1
option2

command1 command2 command3

Private Sub Command1_Click()
End
End Sub

Private Sub Command2_Click()
If Option1.Value = True Then
Label1.Caption = "美元幣種"
Text1.Text = 8.25 * CDbl(Text1.Text)
End If

If Option2.Value = True Then
Label1.Caption = "港幣幣種"
Text1.Text = 1.15 * CDbl(Text1.Text)
End If

End Sub

Private Sub Command3_Click()
Text1.SetFocus
Text1.SelLength = (Text1)
End Sub

Private Sub Form_Load()
Command1.Caption = "退出"
Command2.Caption = "兌換"
Command3.Caption = "清除"
Option1.Caption = "美元"
Option2.Caption = "港幣"
Label1.Caption = "人民幣兌換"
Label2.Caption = "兌換幣種"

Option1.Value = True
End Sub

閱讀全文

與VB編程匯率兌換相關的資料

熱點內容
mt4模擬賬戶設置杠桿 瀏覽:603
交易風控員 瀏覽:583
融資費用攤銷做賬 瀏覽:680
大師談外匯 瀏覽:832
公司回購股票未來如何 瀏覽:621
恆逸集團資產評估報告PDF 瀏覽:418
滾動杠桿機構的自由度 瀏覽:802
銀行存款金融服務方案 瀏覽:993
經營外匯業務的金融機構應當向 瀏覽:753
工行個人信用貸款簡訊 瀏覽:129
昆明外匯招聘信息 瀏覽:482
支付寶帳戶可以付外匯 瀏覽:33
歐元英鎊匯率2014年 瀏覽:757
建信金融科技有限公司成都事業部 瀏覽:148
外匯中轉行都在哪國 瀏覽:54
貴金屬二級考試 瀏覽:431
融資租賃費增值稅 瀏覽:360
中國銀行外匯實時查詢 瀏覽:140
幣系交易所app 瀏覽:510
黑龍江金融控股有限公司地址 瀏覽:261