| | charouha | Posté le 14/12/2007 @ 20:07 | Petite astucienne
1 Message
| j'ai un problem d'execution de la macro et j'arrive pas à le trouver si qlq peut m'aider à trouver la sollution merci voila la macro en vb ; programme du filtrage UserForm1.ShowEnd Sub Public Sub Programme() Open "c:\dh89c.txt" For Input As 1 forme$ = UserForm1.TextBox1.Text If UserForm1.OptionButton1.Value = True Then entete = "{\rtf1\ansi " debutgras = "{\b " fingras = " }" paragraphe = " {\par}" finfichier = "}" Open "c:\resultat.rtf" For Output As 2ElseIf UserForm1.OptionButton2.Value = True Then entete = "<html><head></head><body>" debutgras = "<b>" fingras = "</b>" paragraphe = "<br />" finfichier = "</body></html>" Open "c:\resultat.html" For Output As 2End If compteur1 = 0 compteur2 = 0 Print #2, entete While (EOF(1) = 0) Line Input #1, a$ compteur1 = compteur1 + 1 k = InStr(a$, forme$) If k > 0 Then deb$ = Left$(a$, k - 1) fin$ = Mid$(a$, k + Len(forme$)) Print #2, deb$ + debutgras + forme$ + fingras + fin$ Print #2, paragraphe compteur2 = compteur2 + 1 End IfWend Print #2, finfichier Close (1)Close (2) End Sub
| | |
| |
| Publicité |
|
| | faboun | Posté le 14/12/2007 à 20:15 | Astucien
8851 Messages
| | | | |
| | Haut de la page |
| | Inscrivez-vous ! |
- Posez vos questions
- Résolvez vos problèmes
- Aidez les autres
- Participez et créez vos discussions
- Dialoguez en privé avec d'autres membres
- Suivez vos sujets préférés
- Affichez les signatures des membres
|
|