+ Reply to Thread
Results 1 to 4 of 4

Check if file may be saved with this button

  1. #1
    Registered User
    Join Date
    03-04-2008
    Posts
    2

    Check if file may be saved with this button

    Hi, Who can help me?

    I made two buttons (macro's) to save files.
    For instant: When a user opens file A123.xls, he uses the button 'Save_A123' into a predefined folder (C:\savelocation ) The macro uses the save-as function to save the file with filename A123.XLS)
    When a user opens file B456, he uses the button 'Save_B456' into the same predefined folder (C:\savelocation )

    (Another routine is handling this different kind of excelsheets in this location)

    because there are two buttons I may occur that the user first opens the A123.xls file, but pushes the wrong button: SAVE_B456

    Now the A123 file will be saved as B456.XLS! (And the routine is not vthat bsmart and will handle this file thining that this IS a B file in stead of a A file)


    I want to protect this so the user can not push the wrong button by mistake;
    When he opens the file A123.xls, he may only use the SAVE_A123 button (and of course when he uses the B456 file, he may only use the B Button.

    Who can help me to prevent mistakes from the users by make this macro more save?

    Kind regards,
    Luc

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Maybe like this?
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-04-2008
    Posts
    2
    Hi shg,
    Does this mean we can use simply one button now since the save location is the same, but it checks the original filename?

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Think so ...

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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