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

Thread: Disabling Macros After One Use

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Location
    Waterdown, Ontario
    Posts
    464
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have a spreadsheet that imports text data using a macros. I want the macros to be disabled after one import. I do not want the user to use the import macros again (would screw up the spreadsheet). Can it be done?

    [ This Message was edited by: ammdumas on 2002-03-18 11:32 ]

  2. #2
    Legend NateO's Avatar
    Join Date
    Feb 2002
    Location
    Minneapolis, Mn, USA
    Posts
    9,700
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    You could isolate your procedure in a module and place code at the end of the procedure to clear the module of code, like on the post below:

    http://www.mrexcel.com/board/viewtop...ic=925&forum=2

    You could also store the code in a workbook_open event procedure that would re-write the procedure when the workbook is opened. It will be easier if you have a blank module ready to go. The link at the bottom of the old post will be useful for this.

    Hope this helps.


    _________________
    Cheers, NateO

    [ This Message was edited by: NateO on 2002-03-18 17:20 ]

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Location
    Waterdown, Ontario
    Posts
    464
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I give it a shot. Thanks.

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
  •