ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Format TextBox on UserForm (https://www.excelbanter.com/excel-programming/394728-format-textbox-userform.html)

ryguy7272

Format TextBox on UserForm
 
Thanks to several people who use this DG, I just recently learned how to
format data coming from a SS to a UserForm. I am wondering if there is a way
to format data on the UserForm, to make it easier for the user to quickly and
easily distinguish between, lets say 1000000 and 10000000. I tried the
following:

Format(Cells(27, 2), "$#,##0.00") = TextBox4.Text


That didnt really seem to do anything at all. Does anyone have any
suggestions as to how to do this?

Cordially,
Ryan---


[email protected]

Format TextBox on UserForm
 
On 3 Aug, 14:48, ryguy7272
wrote:
Thanks to several people who use this DG, I just recently learned how to
format data coming from a SS to a UserForm. I am wondering if there is a way
to format data on the UserForm, to make it easier for the user to quickly and
easily distinguish between, let's say 1000000 and 10000000. I tried the
following:

Format(Cells(27, 2), "$#,##0.00") = TextBox4.Text

That didn't really seem to do anything at all. Does anyone have any
suggestions as to how to do this?

Cordially,
Ryan---


Isn't your version backwards?


TextBox4.Text=Format(Cells(27, 2), "$#,##0.00")

would seem more likely


ryguy7272

Format TextBox on UserForm
 
Sorry for not explaining the issue better. The problem is that I am taking
input from the UserForm and transferring it to the SS. I want to try to
format the value as currency when the user is entering data in to UF. I
already have the formatting that I need when the data goes from the SS to the
UF.

Any ideas?



" wrote:

On 3 Aug, 14:48, ryguy7272
wrote:
Thanks to several people who use this DG, I just recently learned how to
format data coming from a SS to a UserForm. I am wondering if there is a way
to format data on the UserForm, to make it easier for the user to quickly and
easily distinguish between, let's say 1000000 and 10000000. I tried the
following:

Format(Cells(27, 2), "$#,##0.00") = TextBox4.Text

That didn't really seem to do anything at all. Does anyone have any
suggestions as to how to do this?

Cordially,
Ryan---


Isn't your version backwards?


TextBox4.Text=Format(Cells(27, 2), "$#,##0.00")

would seem more likely



Tom Ogilvy

Format TextBox on UserForm
 

Cells(27,2) = Format(cdbl(TextBox4.Text), "$#,##0.00")

--
Regards,
Tom Ogilvy


"ryguy7272" wrote:

Sorry for not explaining the issue better. The problem is that I am taking
input from the UserForm and transferring it to the SS. I want to try to
format the value as currency when the user is entering data in to UF. I
already have the formatting that I need when the data goes from the SS to the
UF.

Any ideas?



" wrote:

On 3 Aug, 14:48, ryguy7272
wrote:
Thanks to several people who use this DG, I just recently learned how to
format data coming from a SS to a UserForm. I am wondering if there is a way
to format data on the UserForm, to make it easier for the user to quickly and
easily distinguish between, let's say 1000000 and 10000000. I tried the
following:

Format(Cells(27, 2), "$#,##0.00") = TextBox4.Text

That didn't really seem to do anything at all. Does anyone have any
suggestions as to how to do this?

Cordially,
Ryan---


Isn't your version backwards?


TextBox4.Text=Format(Cells(27, 2), "$#,##0.00")

would seem more likely



Tom Ogilvy

Format TextBox on UserForm
 
another way is to transfer the number and then format the cell to display the
way you want

Cells(27,2) = cdbl(Textbox4.Text)
cells(27,2).Numberformat = "$ #,##0.00"

--
Regards,
Tom Ogilvy


"ryguy7272" wrote:

Sorry for not explaining the issue better. The problem is that I am taking
input from the UserForm and transferring it to the SS. I want to try to
format the value as currency when the user is entering data in to UF. I
already have the formatting that I need when the data goes from the SS to the
UF.

Any ideas?



" wrote:

On 3 Aug, 14:48, ryguy7272
wrote:
Thanks to several people who use this DG, I just recently learned how to
format data coming from a SS to a UserForm. I am wondering if there is a way
to format data on the UserForm, to make it easier for the user to quickly and
easily distinguish between, let's say 1000000 and 10000000. I tried the
following:

Format(Cells(27, 2), "$#,##0.00") = TextBox4.Text

That didn't really seem to do anything at all. Does anyone have any
suggestions as to how to do this?

Cordially,
Ryan---


Isn't your version backwards?


TextBox4.Text=Format(Cells(27, 2), "$#,##0.00")

would seem more likely



ryguy7272

Format TextBox on UserForm
 
Tom, I value your time and I appreciate your help. You have helped me a few
times in the past, and I am thankful for your assistance. I know that you
know Excel at a level others only aspire to, so I am thinking I misunderstood
your directions. I am still struggling with how to use this:
cells(27,2).Numberformat = "$ #,##0.00"


I am trying to get the formatting to occur in the UserForm before it is sent
to a worksheet. When I enter 1000000 into a TextBox, I would like to see
$1,000,000 as soon as I click out of the TextBox, or tab to another box, or
something of that nature. Can this be done?

Regards,
Ryan---

"Tom Ogilvy" wrote:

another way is to transfer the number and then format the cell to display the
way you want

Cells(27,2) = cdbl(Textbox4.Text)
cells(27,2).Numberformat = "$ #,##0.00"

--
Regards,
Tom Ogilvy


"ryguy7272" wrote:

Sorry for not explaining the issue better. The problem is that I am taking
input from the UserForm and transferring it to the SS. I want to try to
format the value as currency when the user is entering data in to UF. I
already have the formatting that I need when the data goes from the SS to the
UF.

Any ideas?



" wrote:

On 3 Aug, 14:48, ryguy7272
wrote:
Thanks to several people who use this DG, I just recently learned how to
format data coming from a SS to a UserForm. I am wondering if there is a way
to format data on the UserForm, to make it easier for the user to quickly and
easily distinguish between, let's say 1000000 and 10000000. I tried the
following:

Format(Cells(27, 2), "$#,##0.00") = TextBox4.Text

That didn't really seem to do anything at all. Does anyone have any
suggestions as to how to do this?

Cordially,
Ryan---

Isn't your version backwards?


TextBox4.Text=Format(Cells(27, 2), "$#,##0.00")

would seem more likely



Tom Ogilvy

Format TextBox on UserForm
 
Well, your answer to Aiden didn't seem to say that. Nonetheless,

TextBox4.Text=Format(cdbl(Textbox4.Text), "$#,##0.00")

Put that in the Exit event of the textbox.

--
Regards,
Tom Ogilvy


"ryguy7272" wrote:

Tom, I value your time and I appreciate your help. You have helped me a few
times in the past, and I am thankful for your assistance. I know that you
know Excel at a level others only aspire to, so I am thinking I misunderstood
your directions. I am still struggling with how to use this:
cells(27,2).Numberformat = "$ #,##0.00"


I am trying to get the formatting to occur in the UserForm before it is sent
to a worksheet. When I enter 1000000 into a TextBox, I would like to see
$1,000,000 as soon as I click out of the TextBox, or tab to another box, or
something of that nature. Can this be done?

Regards,
Ryan---

"Tom Ogilvy" wrote:

another way is to transfer the number and then format the cell to display the
way you want

Cells(27,2) = cdbl(Textbox4.Text)
cells(27,2).Numberformat = "$ #,##0.00"

--
Regards,
Tom Ogilvy


"ryguy7272" wrote:

Sorry for not explaining the issue better. The problem is that I am taking
input from the UserForm and transferring it to the SS. I want to try to
format the value as currency when the user is entering data in to UF. I
already have the formatting that I need when the data goes from the SS to the
UF.

Any ideas?



" wrote:

On 3 Aug, 14:48, ryguy7272
wrote:
Thanks to several people who use this DG, I just recently learned how to
format data coming from a SS to a UserForm. I am wondering if there is a way
to format data on the UserForm, to make it easier for the user to quickly and
easily distinguish between, let's say 1000000 and 10000000. I tried the
following:

Format(Cells(27, 2), "$#,##0.00") = TextBox4.Text

That didn't really seem to do anything at all. Does anyone have any
suggestions as to how to do this?

Cordially,
Ryan---

Isn't your version backwards?


TextBox4.Text=Format(Cells(27, 2), "$#,##0.00")

would seem more likely



ryguy7272

Format TextBox on UserForm
 
Thats it! Thanks so much Tom!! I knew the issue would be resolved when you
got involved!! Also, thanks for the assistance with previous problems. Ive
read through almost all of the Excel Programming DGs and the Excel Worksheet
Functions DGs. Ive learned a lot from you and others that come here. Ive
learned so much at this point€¦its almost inconceivable... Anyway, thanks.


--
RyGuy


"Tom Ogilvy" wrote:

Well, your answer to Aiden didn't seem to say that. Nonetheless,

TextBox4.Text=Format(cdbl(Textbox4.Text), "$#,##0.00")

Put that in the Exit event of the textbox.

--
Regards,
Tom Ogilvy


"ryguy7272" wrote:

Tom, I value your time and I appreciate your help. You have helped me a few
times in the past, and I am thankful for your assistance. I know that you
know Excel at a level others only aspire to, so I am thinking I misunderstood
your directions. I am still struggling with how to use this:
cells(27,2).Numberformat = "$ #,##0.00"


I am trying to get the formatting to occur in the UserForm before it is sent
to a worksheet. When I enter 1000000 into a TextBox, I would like to see
$1,000,000 as soon as I click out of the TextBox, or tab to another box, or
something of that nature. Can this be done?

Regards,
Ryan---

"Tom Ogilvy" wrote:

another way is to transfer the number and then format the cell to display the
way you want

Cells(27,2) = cdbl(Textbox4.Text)
cells(27,2).Numberformat = "$ #,##0.00"

--
Regards,
Tom Ogilvy


"ryguy7272" wrote:

Sorry for not explaining the issue better. The problem is that I am taking
input from the UserForm and transferring it to the SS. I want to try to
format the value as currency when the user is entering data in to UF. I
already have the formatting that I need when the data goes from the SS to the
UF.

Any ideas?



" wrote:

On 3 Aug, 14:48, ryguy7272
wrote:
Thanks to several people who use this DG, I just recently learned how to
format data coming from a SS to a UserForm. I am wondering if there is a way
to format data on the UserForm, to make it easier for the user to quickly and
easily distinguish between, let's say 1000000 and 10000000. I tried the
following:

Format(Cells(27, 2), "$#,##0.00") = TextBox4.Text

That didn't really seem to do anything at all. Does anyone have any
suggestions as to how to do this?

Cordially,
Ryan---

Isn't your version backwards?


TextBox4.Text=Format(Cells(27, 2), "$#,##0.00")

would seem more likely




All times are GMT +1. The time now is 12:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com