Solved

Rechnen mit Double Werten

Posted on 2000-02-17
5
202 Views
Last Modified: 2013-12-26
Hi Experts,

Warum werden in diesem Fall
meine Nachkommastellen einfach nicht
berücksichtigt. Weder bei der Berechnung noch bei der Ausgabe.

grid.Text =
Format(dSummPorto + dSummBearb, "##,##0.00 DM")

dSummPorto = 44,80
sSummBearb = 48,00
Ausgabe =    92,00 statt 92,80
 
Beide Variablen sind als Double deklariert.

MFG
Jörg

0
Comment
Question by:blackjack020900
  • 3
  • 2
5 Comments
 
LVL 2

Expert Comment

by:p_biggelaar
Comment Utility
Hallo,

Ich bin nicht sicher aber Ich denke das grid (von grid.text) ein DataGrid ist.

In diesen Fall sollte man bei Properties -> tab Format eine Custom Format wahlen (deine Format string). Möchtest du ein Format in Code haben, dann must du das machen mit:

DataGrid1.Columns(index).NumberFormat = "##,##0.00 DM"

Entsculdige fur mein slechtes Deutsch.

Now in English, because I think most Experts do know English and only few of them know German:

When you try to format a value and assign it to a cell in a grid, it won't come through. You'll have to use code like this:

DataGrid1.Columns(index).NumberFormat = "##,##0.00 DM"

or set the format property for the approriate column to the correct value, using the property page
0
 

Author Comment

by:blackjack020900
Comment Utility
Leider ist es ein MSFlexGrid.

Um den Text einer Zelle zu Bearbeiten,
konvertiere mit der Val-Funktion, was
nicht funktionieren kann, da die Daten in der Datenbank mit einem Komma als Trennzeichen gespeichert sind.

Die CDbl-Funktion nimmt er mir gar nicht an.

Ich bin etwas ratlos!

MFG
Jörg
0
 
LVL 2

Expert Comment

by:p_biggelaar
Comment Utility
In dieser Fall must du sorgen das die komma ein punkt wird.

Ich hoffe du kannst mir verzeihen, aber Ich mus jetzt gehen...

Bis spater
0
 
LVL 2

Accepted Solution

by:
p_biggelaar earned 50 total points
Comment Utility
p_biggelaar changed the proposed answer to a comment
0
 

Author Comment

by:blackjack020900
Comment Utility
Danke.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now