Solved

Rechnen mit Double Werten

Posted on 2000-02-17
5
208 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 2

Expert Comment

by:p_biggelaar
ID: 2531505
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
ID: 2531583
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
ID: 2532047
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
ID: 2532049
p_biggelaar changed the proposed answer to a comment
0
 

Author Comment

by:blackjack020900
ID: 2558180
Danke.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

756 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