+ Reply to Thread
Results 1 to 2 of 2

Workbook Close application: 'Cancel' problem???

  1. #1
    Registered User
    Join Date
    05-12-2008
    Posts
    40

    Workbook Close application: 'Cancel' problem???

    I have a toolbar application that is created using vba, I am using the code below to close the toolbar when the workbook closes.

    Please Login or Register  to view this content.
    However if the user decides not to close the workbook and clicks cancel then the toolbar is lost.
    To retreive the toolbar either the macro to open the workbook can be run or the file closed then re-opened. Neither of these are desired.

    How do keep the toolbar if the user chooses cancel when attempting to close the workbook.

    thanks
    Arfan

    *EDIT* Just solved it, but if there is a better way then ur reponse is appreciated.

    Please Login or Register  to view this content.
    Last edited by arfanvilla; 10-21-2008 at 06:06 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    It's always best to create the ToolBar within your code. If you do a Forum search you will find examples like

    http://www.excelforum.com/excel-prog...an-add-in.html
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Auto open and close seperate workbook when current one is closed
    By JamesT1 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-28-2008, 12:59 PM
  2. Replies: 8
    Last Post: 07-03-2008, 08:39 PM
  3. Activate workbook before close event when excel is closed
    By RobynC in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2007, 06:19 AM
  4. Excel or workbook close
    By mqdias in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-05-2007, 07:14 AM
  5. VBA close workbook without yes/no prompt
    By captbluefin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-23-2007, 09:08 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1