![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: May 2002
Location: Grand Rapids, MI
Posts: 326
|
I currently have a userform with three combo boxes, I then have the values of them boxes into sheet2 of my workbook, I then have a function of -pmt(b20/12,b17*12,a2) in D7, I also have two commandbuttons, one is calculate and one is cancel, calculate is actually Userform1.hide and Userform2.show. my question is, on Userform2 I have a textbox I would like textbox1 on Userform2 to display the result of D7 when Userform2 pops up using the control button on userform1 captioned calculate, I have tried doing the following
Private Sub TextBox1_Change() Worksheets("Sheet2").Range("D7") = UserForm2.TextBox1.Value TextBox1.Text = Format(TextBox1.Text, "$###,###.##") End Sub and also Private Sub TextBox1_Change() Textbox1.Text = Worksheets("Sheet2").Range("D7") TextBox1.Text = Format(TextBox1.Text, "$###,###.##") End Sub neither work, Is this something that is even possible, or is there a better way to do this through maybe a message box, instead of a textbox Thank you in advance |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Newcastle, UK
Posts: 1,174
|
Quote:
Dim MyNum As Double MyNum = Range("D1").Value UserForm2.TextBox1 = Format(MyNum, "$###,##0.00") UserForm2.Show End Sub
__________________
"Have a good time......all the time" Ian Mac |
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: May 2002
Location: Grand Rapids, MI
Posts: 326
|
Thank you so very much I have been trying like crazy to get that to work. I only had to tell it to use a different cell and sheet other than that it was beuatiful
I never would have guessed that would be the way to have done it thank you again |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|