Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

vba word number formatting a textbox

Avatar of Hakum
HakumFlag for Denmark asked on
Microsoft OfficeVisual Basic ClassicMicrosoft Word
8 Comments1 Solution651 ViewsLast Modified:
Hi again experts,

Another quick question, i'm trying to find a way to format a few userform textbox's but no luck its for formatting it incorrect.

this is the code:

Private Sub txtvjhjp_AfterUpdate()

txtvjhjp.Text = Format(txtvjhjp.Value, "#.##0,00")

End Sub

The result is this: 7000,0000
when it should be this: 7.000,00

I'm also looking for a way to do it easier, there is a few textboxes that need this format is there an easier way, like simply right the textbox name on a list and it will put the form in them all, something like this:

Private Sub decimalseparator_AfterUpdate()

Format(value, "#.##0,00")
    .txtvjhjp
    .txtvjhp
    .txtabc
End Sub

no clue if this is possible at all but would make it easier and the code would be more clean i guess :)

thank you in advance
ASKER CERTIFIED SOLUTION
Avatar of Rgonzo1971
Commented:
This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answers