Explore BrainMass

Explore BrainMass

    VB.NET to Excel

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    If ount = 0 Then
    MsgBox "No files were returned."
    MsgBox "The list is complete. " & Chr(13) & Chr (10) &
    "Found " & FileCount & "files" & Chr (13) 7 Chr(10) &_
    "Occupying" & Int(SumDiskSpace / 100000) / 10 & "MB"
    End If

    If FileCount result is 50, then I would want that sum to appear in cell A5 on an Excel spread sheet. Can someone help me with the code to do this? Attached is an excerpt from the project I am working on.

    © BrainMass Inc. brainmass.com October 9, 2019, 6:58 pm ad1c9bdddf

    Solution Preview

    The first step is to create a reference in our project to Microsoft Excel 11.0 Objects Library (COM reference).

    If exc Is Nothing Then
    MsgBox("ERROR: EXCEL couldn't be started")
    End ...

    Solution Summary

    The solution provides an example of the VB.Net code to Excel.