Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Making a good report.
Message
 
To
06/01/2001 11:33:57
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00459442
Message ID:
00460225
Views:
21
>I was working with that but the result was a lot of words separeted by scuares I dont like that.
>Are you able to explain me with an example.?
>TIA


Add 3 command button on a form and a Microsoft FlexGrid. Then copy this code:
Option Explicit

Private Sub Command1_Click()
Dim intFF As Integer

'On Error Resume Next
    intFF = FreeFile
    Open "d:\test.csv" For Append As intFF
    Print #intFF, "Date Time, Store, File Description, Status"
    Print #intFF, "--------------------------, ---------, ----- -----------, ------"
    Print #intFF, "#2000-12-22 09:33:08#,Los Cactus,cajas.dbf,Satisfactorio"
    Print #intFF, "#2000-12-22 09:33:08#,Los Cactus,cajeros.dbf,Satisfactorio"
    Print #intFF, "#2000-12-22 09:33:08#,Los Cactus,cuentas.dbf,Satisfactorio"
    Print #intFF, "#2000-12-22 09:33:08#,Los Cactus,provee.dbf,Satisfactorio"
    Close intFF
End Sub

Private Sub Command2_Click()
With MSFlexGrid1
    .Cols = 4
    .FixedCols = 0
    .FixedRows = 0
    .Rows = 0
    .Clear
    .AddItem "Date Time" & vbTab & "Store" & vbTab & "File Description" & vbTab & "Status"
    .AddItem "#2000-12-22 09:33:08#" & vbTab & "Los Cactus" & vbTab & "cajas.dbf" & vbTab & "Satisfactorio"
    .AddItem "#2000-12-22 09:33:08#" & vbTab & "Los Cactus" & vbTab & "cajeros.dbf" & vbTab & "Satisfactorio"
    .AddItem "#2000-12-22 09:33:08#" & vbTab & "Los Cactus" & vbTab & "cuentas.dbf" & vbTab & "Satisfactorio"
    .AddItem "#2000-12-22 09:33:08#" & vbTab & "Los Cactus" & vbTab & "provee.dbf" & vbTab & "Satisfactorio"
    .ColWidth(0) = 2000
    .ColWidth(1) = 1500
    .ColWidth(2) = 1500
    .ColWidth(3) = 2000
End With
End Sub

Private Sub Command3_Click()
Printer.PaintPicture MSFlexGrid1.Picture, 0, 0
Printer.EndDoc
End Sub
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform