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. Setting Default filename in Excel fileSaveAs Dialog

Setting Default filename in Excel fileSaveAs Dialog

Scheduled Pinned Locked Moved Visual Basic
csharphelpquestion
2 Posts 2 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.
  • N Offline
    N Offline
    nvmoss
    wrote on last edited by
    #1

    I am writing a VB.NET application that dumps data to Excel. After the dump, I want to prompt the user to save the file by showing the SaveFileAs Dialog Box. I am having trouble setting the default file name in the Dialog Box with the statement: Result = EXL.Dialogs(Excel.XlBuiltInDialog.xlDialogSaveAs).Show Argl:= fName VB.NEt indicates a syntax error (End of statement expected) The equivalent statement works in Excel, what am I doing wrong? Thanks! Nelson

    J 1 Reply Last reply
    0
    • N nvmoss

      I am writing a VB.NET application that dumps data to Excel. After the dump, I want to prompt the user to save the file by showing the SaveFileAs Dialog Box. I am having trouble setting the default file name in the Dialog Box with the statement: Result = EXL.Dialogs(Excel.XlBuiltInDialog.xlDialogSaveAs).Show Argl:= fName VB.NEt indicates a syntax error (End of statement expected) The equivalent statement works in Excel, what am I doing wrong? Thanks! Nelson

      J Offline
      J Offline
      John Kuhn
      wrote on last edited by
      #2

      The syntax "Argl:= fName" shouldn't work in VB.NET. I believe that you simply pass the file name to the show method. Also, several people have written introductions to using Excel and Word in VB.NET and C#, you might try those if you have other problems.

      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