Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

VBA. affichage

1 réponse
Avatar
benn09
Bonjour,
voila mon algorithme.
mais je veux afficher le produit dans la feuil excel.
Option Explicit
'projet methode numerique
Function Prod(M As udtMatrice) As Double
Dim i As Integer

Prod = 1

For i = 0 To M.NbrCol - 1

Prod = Prod * M.coef(i, i)

Next i
MsgBox ("le produit des termes diagonaux" & Prod)

End Function

Sub Produit33()
Dim M As udtMatrice


M.NbrCol = InputBox(" le nombre de colonne")

M.Nom = InputBox("quel est le nom de la matrice")
M = InitMat(M.NbrCol, M.NbrCol, M.Nom)
Call Prod(M)
Call dispmat(M)
Call writemat("feuil1", 1, 1, M)



End Sub



et merci d'avance

1 réponse

Avatar
MichD
Bonjour,

Si tu veux publier ton code, organise-toi pour qu'il soit complet.

A )
Le code publié fait appel à un type personnalisé d'une variable que tu
dois avoir dans le haut du module, cela devrait ressembler à ceci :

Type UdtMatrice
Nom As String
NbrCol As Long
End Type


B )
L'exécution de la procédure "Produit33" fait appel à 3 autres fonctions,
où retrouve-t-on ces fonctions?

1- InitMat()
2- dispmat
3- writemat


C )
Tu dis avoir un problème d'affichage, expliques ce que tu obtiens et ce
que tu voudrais obtenir à partir de ton code.


MichD