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. Excel template is getting opened unncecssarily--- vb.net 2008

Excel template is getting opened unncecssarily--- vb.net 2008

Scheduled Pinned Locked Moved Visual Basic
debuggingcsharphelp
2 Posts 2 Posters 1 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
    Pankaj Garg
    wrote on last edited by
    #1

    I have an excel template, from this template i copy the worksheet and save it to workbook. I initially created an excel.application instance

    xlsApp1 = CreateObject("Excel.Application")

    then , i open this template file

    temp = xlsApp1.Workbooks.Open(ExsTemplate & "sheet.xls")

    i am presently in debug mode and breakpoint is on the above line. and right after this i open an excel sheet by double clicking it which is lying in my hard drive. This opens the template file also. This is the problem. Can u tell me how should i avoid this problem.

    K 1 Reply Last reply
    0
    • P Pankaj Garg

      I have an excel template, from this template i copy the worksheet and save it to workbook. I initially created an excel.application instance

      xlsApp1 = CreateObject("Excel.Application")

      then , i open this template file

      temp = xlsApp1.Workbooks.Open(ExsTemplate & "sheet.xls")

      i am presently in debug mode and breakpoint is on the above line. and right after this i open an excel sheet by double clicking it which is lying in my hard drive. This opens the template file also. This is the problem. Can u tell me how should i avoid this problem.

      K Offline
      K Offline
      Kschuler
      wrote on last edited by
      #2

      You problem isn't clear. Are you asking for a way to stop someone from opening a file? Because I don't think you can do that. Or are you getting an error because the file has been opened by the user? In which case, what is the 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