Toggle Button VBA

jonnywakey

Registered User.
Local time
Today, 22:39
Joined
Feb 2, 2009
Messages
33
Hi all

Is anyone aware of any VBA which would change the format of a textbox from UK £'s to US $'s and applying a set conversion rate on click of a toggle button?

Thanks in advance for any ideas.

Jonny:)
 
Just air code, but something like this maybe.

Code:
    Dim cur As String
    Dim value As Integer
    
    Dim euToUS As Integer: euToUS = 0.13
    Dim usToEU As Integer: usToEU = 0.13
    
    If Len(txtcurreny.value & vbNullString) > 0 Then
    
        cur = Left(txtCurrency.value, 1)
        value = Mid(txtCurrency, 2)
        
        If cur = "£" Then
              value = value * euToUS
        ElseIf cur = "$" Then
              value = value * usToEU
        End If
        
    End If
 

Users who are viewing this thread

Back
Top Bottom