November 16, 2020
Hi all,
You have helped massively on a couple of issues I have had and hope that you may be able to help me again.
I have a userform with various textboxes. One of which is where the user will input the value of an invoice in to a textbox (InvoiceCost).
There is a combobox (TestCurrency) where the user selects which currency the invoice is in.
When the user presses the OK button, I would like it to combine the value of the combobox (TestCurrency) and textbox (InvoiceCost) and put it on to the sheet in column W.
Every solution I have tried either puts the symbol (£, $ or €) on to the sheet, or the value in the textbox but never both.
I have tried several solutions: -
1. Creating a third textbox which combines the value in the combobox and the textbox which does show the currency and the value but then the symbol still does not transfer on to the Sheet1 column W or converts it straight away to £.
2. Changing how the symbol is populated in the combobox with the below, to see if it was because I hadn't created the symbol properly but this doesn't transfer either
Select Case TestCurrency.Value
Case Is = "£"
InvoiceCost.Text = ChrW("&h2191")
Case Is = "€"
InvoiceCost.Text = ChrW("&h20AC")
Case Is = "$"
InvoiceCost.Text = ChrW("&h0024")
InvoiceCost.Font.Name = Abadi
End Select
3. Changing the spreadsheet columns to do a calculation based on if the symbol in the combobox equals the value in cells AA1:AA3.
Does anyone have any ideas at all?
Thank you very much!
Trusted Members
Moderators
November 1, 2018
February 20, 2020
Hello,
you can attach a demo of your file and better explain what you want to happen?
an example to put any text in the cell without excel changing it (be it date, numbers (ex: 000123), various types of currency in the same column, ...)
Dim lastrow As Integer
lastrow = ActiveSheet.Cells(ActiveSheet.Rows.Count, "A").End(xlUp).Row + 1
ActiveSheet.Cells(lastrow, 1).NumberFormat = "@" ' format cell to text to accept any data without changing it
ActiveSheet.Cells(lastrow, 1).Value = Me.TextBox1.Value
Miguel,
Answers Post
1 Guest(s)