• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Currency change in textbox userform to Sheet1|VBA & Macros|Excel Forum|My Online Training Hub

You are here: Home / Currency change in textbox userform to Sheet1|VBA & Macros|Excel Forum|My Online Training Hub

vba course banner

Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumVBA & MacrosCurrency change in textbox userform…
sp_PrintTopic sp_TopicIcon
Currency change in textbox userform to Sheet1
Avatar
Helen Warburton
Member
Members
Level 0
Forum Posts: 20
Member Since:
November 16, 2020
sp_UserOfflineSmall Offline
1
December 4, 2020 - 8:29 pm
sp_Permalink sp_Print

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!

sp_AnswersTopicSeeAnswer See Answer
Avatar
Velouria
London or thereabouts
Moderator
Members


Trusted Members

Moderators
Level 4
Forum Posts: 649
Member Since:
November 1, 2018
sp_UserOfflineSmall Offline
2
December 4, 2020 - 9:12 pm
sp_Permalink sp_Print

I would strongly suggest that you keep the currency code and the actual value as separate cells.

Avatar
Miguel Santos
Member
Members
Level 0
Forum Posts: 80
Member Since:
February 20, 2020
sp_UserOfflineSmall Offline
3
December 5, 2020 - 5:49 pm
sp_Permalink sp_Print

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,

sp_AnswersTopicAnswer
Answers Post
Avatar
Helen Warburton
Member
Members
Level 0
Forum Posts: 20
Member Since:
November 16, 2020
sp_UserOfflineSmall Offline
4
December 7, 2020 - 7:18 pm
sp_Permalink sp_Print

Hi Miguel,

Thank you so much!! Exactly what I needed 😀

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Mynda Treacy
Guest(s) 10
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 873
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 222
Jessica Stewart: 218
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Aminu Sule
Samuel Ramirez
Abdifatah Osman
mohad borhom
Abayomi Adedeji
Ganesh MVS
Gilbert Lemek
Ashleigh Farquharson
Jayz Luu
Fred Smith
Forum Stats:
Groups: 3
Forums: 24
Topics: 6364
Posts: 27828

 

Member Stats:
Guest Posters: 49
Members: 32346
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.