+ Reply to Thread
Results 1 to 2 of 2

Merging Two Private Subs

  1. #1
    Forum Contributor
    Join Date
    10-09-2015
    Location
    Canada
    MS-Off Ver
    Office Home and Student 2021 for Mac
    Posts
    170

    Merging Two Private Subs

    Hi all,

    I'm fairly new to Excel VBA, and am trying to protect a workbook as much as I can.

    I've been able to work my way around this VBA code (which gives the user a warning message if Excel has detected that the workbook has been copied to another location. The file then automatically closes)

    HTML Code: 
    So this will prevent the macro from running if the workbook is moved or copied

    I then have this macro:

    HTML Code: 
    Which will delete the workbook once it is closed.

    What I am trying to accomplish is combining these two, so that Excel generates the pop up if the file is moved, closes itself, then deletes itself (which is where I'm trying to integrate the second macro) once it has automatically closed.

    Any and all suggestions are greatly appreciated!

  2. #2
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    917

    Re: Merging Two Private Subs

    Hi to all, just to add missing cross-post link: LINK

+ 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. Merge 2 Private Subs into 1
    By singerbatfink in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-22-2018, 04:24 AM
  2. I need to combine 2 private subs
    By superchew in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-17-2014, 10:30 AM
  3. Combining two private subs
    By sydney5316 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-20-2013, 05:43 PM
  4. Private Subs: Using 2 in 1
    By sdpnoy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-16-2013, 12:59 PM
  5. Module Subs executing Private Subs without prompt by code - Totally Lost
    By Ozan Ertem in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 12-26-2012, 05:31 PM
  6. Multiple Private subs
    By LouiseH24 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-14-2011, 01:18 PM
  7. [SOLVED] Private subs
    By Flima in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-07-2005, 07:06 PM

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