Results 1 to 2 of 2

Thread: [RESOLVED] How to print time elapsed in EXCEL

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2006
    Posts
    79

    Resolved [RESOLVED] How to print time elapsed in EXCEL

    hi do anyone here noe how to print time elapsed in EXCEL ? not in window not in other form..i just want it print in excel spreadsheet..thx alot..

  2. #2
    Lively Member okosv's Avatar
    Join Date
    Sep 2006
    Posts
    95

    Re: How to print time elapsed in EXCEL

    Add reference to MS Excel library in Project>References
    than use this code
    VB Code:
    1. Dim objExcelApp As Excel.Application,objExcelWb as Excel.Workbook
    2. Set objExcelApp=New Excel.Application
    3. 'objExcelApp.Visible=True
    4. Set objExcelWb=objExcelApp.Workbooks.Add
    5. objExcelWb.Sheets(1).Cells(1,1).Value=Now
    6. objExcelWb.SaveAs "C:\timewb.xls"
    7. objExcelWb.Close
    8. objExcelApp.Quit
    9. Set objExcelWb=Nothing
    10. Set objExcelApp=Nothing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width