Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default TextBox formatting (Revisited)

I'm using the following code to format a group of
textboxes on a userform (thanks for your help Bob):

Private Sub TextBox46_AfterUpdate()
TextBox46.Text = Format(TextBox46.Text, "#,##0.00")
End Sub

Private Sub TextBox47_AfterUpdate()
TextBox47.Text = Format(TextBox47.Text, "#,##0.00")
End Sub

Private Sub UserForm_Activate()
TextBox46.Text = Format(TextBox46.Text, "#,##0.00")
TextBox47.Text = Format(TextBox47.Text, "#,##0.00")
End Sub

I'm using a macro button with the following code to show
this userform:

Sub Costing()
Costing1.Show
End Sub

I think this is where the problem is. If i show the
userform using this code the formatting will not work. I
have another userform being shown with a command button on
this userform that works fine which leads me to believe
that it's with the macro button code. Any ideas?

TIA,

Todd
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default TextBox formatting (Revisited)

Todd,

I think you may be unloading the form, rather than hiding it

Unload Costing or Unload Me

should be

Hide.Costing or Hide.Me

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"ToddG" wrote in message
...
I'm using the following code to format a group of
textboxes on a userform (thanks for your help Bob):

Private Sub TextBox46_AfterUpdate()
TextBox46.Text = Format(TextBox46.Text, "#,##0.00")
End Sub

Private Sub TextBox47_AfterUpdate()
TextBox47.Text = Format(TextBox47.Text, "#,##0.00")
End Sub

Private Sub UserForm_Activate()
TextBox46.Text = Format(TextBox46.Text, "#,##0.00")
TextBox47.Text = Format(TextBox47.Text, "#,##0.00")
End Sub

I'm using a macro button with the following code to show
this userform:

Sub Costing()
Costing1.Show
End Sub

I think this is where the problem is. If i show the
userform using this code the formatting will not work. I
have another userform being shown with a command button on
this userform that works fine which leads me to believe
that it's with the macro button code. Any ideas?

TIA,

Todd



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default TextBox formatting (Revisited)

That did it Bob, but now when I close the workbook and
open it back up the textboxes go back to their original
format. I give up. Thanks VERY much for your help, I
really appreciate it.
-----Original Message-----
Todd,

I think you may be unloading the form, rather than hiding

it

Unload Costing or Unload Me

should be

Hide.Costing or Hide.Me

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"ToddG" wrote in message
...
I'm using the following code to format a group of
textboxes on a userform (thanks for your help Bob):

Private Sub TextBox46_AfterUpdate()
TextBox46.Text = Format(TextBox46.Text, "#,##0.00")
End Sub

Private Sub TextBox47_AfterUpdate()
TextBox47.Text = Format(TextBox47.Text, "#,##0.00")
End Sub

Private Sub UserForm_Activate()
TextBox46.Text = Format(TextBox46.Text, "#,##0.00")
TextBox47.Text = Format(TextBox47.Text, "#,##0.00")
End Sub

I'm using a macro button with the following code to show
this userform:

Sub Costing()
Costing1.Show
End Sub

I think this is where the problem is. If i show the
userform using this code the formatting will not work. I
have another userform being shown with a command button

on
this userform that works fine which leads me to believe
that it's with the macro button code. Any ideas?

TIA,

Todd



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default TextBox formatting (Revisited)

Todd,

Don't give up.

What exactly are your objectives?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"ToddG" wrote in message
...
That did it Bob, but now when I close the workbook and
open it back up the textboxes go back to their original
format. I give up. Thanks VERY much for your help, I
really appreciate it.
-----Original Message-----
Todd,

I think you may be unloading the form, rather than hiding

it

Unload Costing or Unload Me

should be

Hide.Costing or Hide.Me

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"ToddG" wrote in message
...
I'm using the following code to format a group of
textboxes on a userform (thanks for your help Bob):

Private Sub TextBox46_AfterUpdate()
TextBox46.Text = Format(TextBox46.Text, "#,##0.00")
End Sub

Private Sub TextBox47_AfterUpdate()
TextBox47.Text = Format(TextBox47.Text, "#,##0.00")
End Sub

Private Sub UserForm_Activate()
TextBox46.Text = Format(TextBox46.Text, "#,##0.00")
TextBox47.Text = Format(TextBox47.Text, "#,##0.00")
End Sub

I'm using a macro button with the following code to show
this userform:

Sub Costing()
Costing1.Show
End Sub

I think this is where the problem is. If i show the
userform using this code the formatting will not work. I
have another userform being shown with a command button

on
this userform that works fine which leads me to believe
that it's with the macro button code. Any ideas?

TIA,

Todd



.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default TextBox formatting (Revisited)

Put the same code in the Initialize event of the userform.

--
Regards,
Tom Ogilvy


"ToddG" wrote in message
...
That did it Bob, but now when I close the workbook and
open it back up the textboxes go back to their original
format. I give up. Thanks VERY much for your help, I
really appreciate it.
-----Original Message-----
Todd,

I think you may be unloading the form, rather than hiding

it

Unload Costing or Unload Me

should be

Hide.Costing or Hide.Me

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"ToddG" wrote in message
...
I'm using the following code to format a group of
textboxes on a userform (thanks for your help Bob):

Private Sub TextBox46_AfterUpdate()
TextBox46.Text = Format(TextBox46.Text, "#,##0.00")
End Sub

Private Sub TextBox47_AfterUpdate()
TextBox47.Text = Format(TextBox47.Text, "#,##0.00")
End Sub

Private Sub UserForm_Activate()
TextBox46.Text = Format(TextBox46.Text, "#,##0.00")
TextBox47.Text = Format(TextBox47.Text, "#,##0.00")
End Sub

I'm using a macro button with the following code to show
this userform:

Sub Costing()
Costing1.Show
End Sub

I think this is where the problem is. If i show the
userform using this code the formatting will not work. I
have another userform being shown with a command button

on
this userform that works fine which leads me to believe
that it's with the macro button code. Any ideas?

TIA,

Todd



.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default TextBox formatting (Revisited)

Tom and Bob,

I have a simple spreadsheet which contains a list of
prices. The userform is simply an easier way of changing
these values from one location. This userform is activated
using a macro button in a custom menu. Everything is
working fine until i close the file and open it back up.
The formatting goes back to its original state. Tried
putting the code in UserForm_Initialize and it still does
it. My apologies if I sounded negative in my earier post,
i've just spent a lot of time trying to get a stinking
zero in a textbox...lol

Thanks very much for your help, it's truly appreciated.
-----Original Message-----
Put the same code in the Initialize event of the userform.

--
Regards,
Tom Ogilvy


"ToddG" wrote in message
...
That did it Bob, but now when I close the workbook and
open it back up the textboxes go back to their original
format. I give up. Thanks VERY much for your help, I
really appreciate it.
-----Original Message-----
Todd,

I think you may be unloading the form, rather than

hiding
it

Unload Costing or Unload Me

should be

Hide.Costing or Hide.Me

--

HTH

Bob Phillips
... looking out across Poole Harbour to the

Purbecks
(remove nothere from the email address if mailing

direct)

"ToddG" wrote in

message
...
I'm using the following code to format a group of
textboxes on a userform (thanks for your help Bob):

Private Sub TextBox46_AfterUpdate()
TextBox46.Text = Format(TextBox46.Text, "#,##0.00")
End Sub

Private Sub TextBox47_AfterUpdate()
TextBox47.Text = Format(TextBox47.Text, "#,##0.00")
End Sub

Private Sub UserForm_Activate()
TextBox46.Text = Format(TextBox46.Text, "#,##0.00")
TextBox47.Text = Format(TextBox47.Text, "#,##0.00")
End Sub

I'm using a macro button with the following code to

show
this userform:

Sub Costing()
Costing1.Show
End Sub

I think this is where the problem is. If i show the
userform using this code the formatting will not

work. I
have another userform being shown with a command

button
on
this userform that works fine which leads me to

believe
that it's with the macro button code. Any ideas?

TIA,

Todd


.



.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default TextBox formatting (Revisited)

Todd,

When you say '...Everything is working fine until I close the file and open
it back up. The formatting goes back to its original state ..' can we
dissect what exactly that means.

Are you actually closing the file that the form is in?
Form goes back to its original state - you mean when you open the form after
re-opening the workbook? Tom and my version should still maintain the
format, but the values will dis-appear. What exactly do you want to see
happen.

keep going, we'll get there. We have been here before if you recall, and we
made it.

Best Regards

Bob

"ToddG" wrote in message
...
Tom and Bob,

I have a simple spreadsheet which contains a list of
prices. The userform is simply an easier way of changing
these values from one location. This userform is activated
using a macro button in a custom menu. Everything is
working fine until i close the file and open it back up.
The formatting goes back to its original state. Tried
putting the code in UserForm_Initialize and it still does
it. My apologies if I sounded negative in my earier post,
i've just spent a lot of time trying to get a stinking
zero in a textbox...lol

Thanks very much for your help, it's truly appreciated.
-----Original Message-----
Put the same code in the Initialize event of the userform.

--
Regards,
Tom Ogilvy


"ToddG" wrote in message
...
That did it Bob, but now when I close the workbook and
open it back up the textboxes go back to their original
format. I give up. Thanks VERY much for your help, I
really appreciate it.
-----Original Message-----
Todd,

I think you may be unloading the form, rather than

hiding
it

Unload Costing or Unload Me

should be

Hide.Costing or Hide.Me

--

HTH

Bob Phillips
... looking out across Poole Harbour to the

Purbecks
(remove nothere from the email address if mailing

direct)

"ToddG" wrote in

message
...
I'm using the following code to format a group of
textboxes on a userform (thanks for your help Bob):

Private Sub TextBox46_AfterUpdate()
TextBox46.Text = Format(TextBox46.Text, "#,##0.00")
End Sub

Private Sub TextBox47_AfterUpdate()
TextBox47.Text = Format(TextBox47.Text, "#,##0.00")
End Sub

Private Sub UserForm_Activate()
TextBox46.Text = Format(TextBox46.Text, "#,##0.00")
TextBox47.Text = Format(TextBox47.Text, "#,##0.00")
End Sub

I'm using a macro button with the following code to

show
this userform:

Sub Costing()
Costing1.Show
End Sub

I think this is where the problem is. If i show the
userform using this code the formatting will not

work. I
have another userform being shown with a command

button
on
this userform that works fine which leads me to

believe
that it's with the macro button code. Any ideas?

TIA,

Todd


.



.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
formatting a textbox Ed Excel Discussion (Misc queries) 1 February 24th 08 09:15 PM
Textbox Formatting jmc8355 Excel Discussion (Misc queries) 3 April 24th 07 06:30 PM
TextBox Formatting ToddG[_2_] Excel Programming 5 April 7th 04 09:29 PM
Textbox formatting James Auty Excel Programming 1 February 4th 04 06:34 PM
Textbox formatting Todd Huttenstine[_3_] Excel Programming 5 January 25th 04 12:25 AM


All times are GMT +1. The time now is 02:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"