I have this massive project. When my client enters numbers into the TextBoxes on the UserForm, she wants it to return
I have this massive project. When my client enters numbers into the TextBoxes on the UserForm, she wants it to return
Alan

This month, every Windows Secrets subscriber can download a one-chapter excerpt of Windows 7: The Missing Manual.Windows 7: The Missing Manual provides valuable information to help you overcome these difficulties in learning a new operating system. Subscribe today to download your free excerpt.
Youc could use
<code>
Val(Replace(Replace(txtCliBR, "$", ""), ",", ""))</code>
Where should I do this, when I am writing to the saved file?
Alan
Your question was "Can I convert it back to numeric before/while saving it to the spreadsheet? Anybody got some sample code?"
Say that the contents of txtCliBR are to be stored in cell B2 of Sheet1. You'd use
Worksheets("Sheet1").Range("B2") = Val(Replace(Replace(txtCliBR, "$", ""), ",", ""))
You could precede this with a check whether txtCliBR has actually been filled in.
<big> <font face="Comic Sans MS">Has anyone told you that you are genius lately? I did not have my "smart hat" when I asked the 2nd question.</font face=comic> Already figured it out. </big> <img src=/S/bash.gif border=0 alt=bash width=35 height=39>
I only save what absolutely must be used in the later calculation so it would have given the user an error earlier if something was not filled in.
This "2 week" project has turned into 10 weeks.
Alan
Why not (if possible) simply format the appropriate worksheet cells to the $###,##0.00 format, and deal only with the numeric value in your code. e.g. with B2 formatted as above:
<div style="width: 100%; background-color: #FFFFFF;"><code><font color=black>
<font color=blue>Sub</font color=blue> test()
<font color=blue>Dim</font color=blue> num <font color=blue>As</font color=blue> <font color=blue>Double</font color=blue>
num = InputBox("Type your number")
Worksheets("Sheet1").Range("B2") = num
num = Worksheets("Sheet1").Range("B2")
num = num * 2
MsgBox num
<font color=blue>End</font color=blue> <font color=blue>Sub</font color=blue>
</font color=black></code></div hiblock>
Alan