Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. errors on calling excel.sheets methods

errors on calling excel.sheets methods

Scheduled Pinned Locked Moved Visual Basic
helpcsharpc++testing
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pnpfriend
    wrote on last edited by
    #1

    Hello.. i wrote excel automation using vc++ 6.0 I had no problem.. now I'm converting all the c++ code into vb.net code and i am encountering problems whenever I call any function/ method of Excel.Sheets I got following message An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in PrintMSOF.exe Additional information: Exception from HRESULT: 0x800A03EC. here How I open the file and get all sheets to printpreview I also tried shets = wBook.Worksheets to get the WorkSheets as I did in c++ but error toooo Dim excelApp As Excel.Application Dim wBooks As Excel.Workbooks Dim wBook As Excel.Workbook Dim sheets As Excel.Sheets Dim shets As Excel.WorkSheets excelApp = CreateObject("Excel.Application") excelApp.Visible = True excelApp.UserControl = True wBooks = excelApp.Workbooks() wBook = wBooks.Open(filename) sheets = wBook.Worksheets sheets.Select() 'error error error error

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups