LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Localisation decimal problems

So what the heck have they been doing in Seattle since -97 then?
I hope something good would happen after "conception", you have to care for
your baby after birth as well!! Ive searched through the community but there
are no proper solutions only workarounds. Even Access has a TextBox that can
have a number OR date format and a decimal property too. I dont know if
theyve solved this problem in Access, but it sure looks much more thoroughly
done!
So maybe you can €śrant€ť and €śvine€ť together with me so they start
programming! :)

ControlSource: I dont see your point! There are 60 controls with
controlsources
to the same worksheet, €śSystem€ť. Why write the address for every control.

Comma replacement: I dont feel sure about such a workaround. My workbook is
an €śadministrative system€ť and relatively comprehensive with an advanced
calculation part, possibilities to save numerous business calculations,
transfer offers to orders and purchases, invoice order confirmations,
call-off from running contracts, etc. Pretty much of it starts from a
previously saved calculation, order, purchase, etc and replacing all commas
to periods throughout the system while still having a Swedish localisation,
would give me nightmares! Naaeee!

Yeah, you are right, Ive never worked with class modules. I sure would like
to learn
but the articles I found in MSDN didnt give much of an idea to what
functions I should move to a class module and which advantages it would
bring.

OSumUpdate: Yes, this is probable the best solution. I chosen the simple way
of
letting the spreadsheet doing the calculation and repeatedly refresh the
labels to
to display the result. Lets say I change the quantity. The sales value for
the item,
the value for the order, the VAT and the total sum must be immediately
recalculated.
For that reason it was simple to collect the refreshing of these labels in
one procedure and let any change in every Text- and ComboBoxes.AfterUpdate
jump to OSumUpdate and the refreshing is done! What youre suggesting would
require much more code (there are 4 possible lines for registration) but its
probably a more proper solution.

Best regards
Mats


"keepITcool" wrote:

Mats.

Afraid your "rant" is old news :(

MSForms and VBA are US centric, and have been since conception.
(and MSforms hasn't changed since 97)

Numeric or date input in textboxes has always been a hassle.
Working with controlsource doesn't make it any easier,
since it's linked to Formula rather than FormulaLocal property

And in this case it's only a decimal... not dates etc.

A few tips:

control source.
No need to Activate worksheet "system" if you specify the controlsource
as the EXTERNAL (fully qualified) address of the range.

e.g. Me.Textbox1.ControlSource =
wksSys.Range("a1").address(external:=true)

To keep your coding to a minimum you can opt to force
any "," to a "." with a simple routine:

Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
If Application.DecimalSeparator < "." Then
If KeyAscii = Asc(Application.DecimalSeparator) Then
KeyAscii = Asc(".")
End If
End If
End Sub

If you've never worked with class modules then you'll have to repeat
this event handler for all "number" textboxes, else you could set up 1
class for all the boxes.


The call to oSumUpdate is not needed.
The label's controlsource can be set to a cell with a sum formula.
...and if you make that formula output a formatted STRING
with the TEXT worksheetfunction. e.g. =TEXT(SUM(A1:A3),"#,##0.00")
the formatting is taken care of.


HTH.


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


 
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
Localisation problem with pivot tables Daniel Hilgarth Setting up and Configuration of Excel 2 May 29th 08 07:04 AM
Subtracting two 2-decimal place numbers gives result 13-decimal places? [email protected] Excel Worksheet Functions 5 March 12th 07 10:38 PM
Batch converting CSV files from comma-decimal to period-decimal Nodles Excel Discussion (Misc queries) 3 July 5th 06 06:57 PM
Converting 2-place decimal value to floating point decimal number with leading zero Kermit Piper Excel Discussion (Misc queries) 3 March 18th 06 06:20 PM
Localisation problem?? Mats Samson Excel Programming 0 February 16th 06 08:21 PM


All times are GMT +1. The time now is 10:24 PM.

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

About Us

"It's about Microsoft Excel"