Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: VBA Excel help

  1. #1
    New Member
    Join Date
    Feb 2002
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi, Im looking for what probably is a simple piece of code, but I cant get it to work. it is a .exe file in VB

    Open Excel (this works fine)

    Open a | delimited file (this works fine)

    Save the file as a text file of the same
    name without promping the user about a file exists of the same name etc.

    now close Excel(I cant get this working)

    I hope somebody out there would be able to help me.

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Sydney, Australia
    Posts
    2,940
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default

    Is your code running from Excel or from VB?

    If it's from Excel then use

    Application.Quit

    If it's from VB then use

    xlAppObjectName.Quit

    Where xlAppObject name is the name of the variable you're using to reference Excel. If this isn't right then you're probably best off posting the offending bit of code.

    Regards,

    D

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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