+ Reply to Thread
Results 1 to 5 of 5

Force User to Enable Macros - Issue with activating specific sheet afterwards...

  1. #1
    Registered User
    Join Date
    07-20-2009
    Location
    Roseburg, OR
    MS-Off Ver
    Excel 2007
    Posts
    21

    Force User to Enable Macros - Issue with activating specific sheet afterwards...

    Ladies & Gents,

    I am utilizing the following code to force the user of my database to enable macros. This is the code:

    Please Login or Register  to view this content.
    It seems like I should just be able to add
    Please Login or Register  to view this content.
    to the end of ShowALL - but It does not seem to be working...

    Any and all help would be greatly appreciated.
    Last edited by aboveliquidice; 08-04-2009 at 04:28 PM.

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Force User to Enable Macros - Issue with activating specific sheet afterwards...

    I would use:

    Please Login or Register  to view this content.
    Change Sheet1 (code name for the sheet) to the applicable sheet in your workbook (whatever sheet = "Directory")

  3. #3
    Registered User
    Join Date
    07-20-2009
    Location
    Roseburg, OR
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Force User to Enable Macros - Issue with activating specific sheet afterwards...

    Quote Originally Posted by Palmetto View Post
    I would use:

    Please Login or Register  to view this content.
    Change Sheet1 (code name for the sheet) to the applicable sheet in your workbook (whatever sheet = "Directory")
    What is the proper placement of the code? Just above the setting of the macro sheet to hidden does not seem to work...

  4. #4
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Force User to Enable Macros - Issue with activating specific sheet afterwards...

    Sorry.
    I assume you are calling the Show All sub from within the module named "ThisWorkbook", which is where the code should be placed.

    Since I don't know if you are running other code in that module . . .
    I would place the line of code I gave you after whichever line of code calls the Show All sub or near the very end of the event.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-20-2009
    Location
    Roseburg, OR
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Force User to Enable Macros - Issue with activating specific sheet afterwards...

    Quote Originally Posted by Palmetto View Post
    Sorry.
    I assume you are calling the Show All sub from within the module named "ThisWorkbook", which is where the code should be placed.

    Since I don't know if you are running other code in that module . . .
    I would place the line of code I gave you after whichever line of code calls the Show All sub or near the very end of the event.

    Please Login or Register  to view this content.
    This code:

    Please Login or Register  to view this content.
    Gives a variable not defined error...

    I definitely did not write this code - so I am still learning the ins and outs of it. The Boolean is placed in a module... which consists of the code listed above. There are several sections of code listed under thisWorkbook that seem to relate to this as well.

    Thank you for bringing thisWorkbook up as the proper location for the code. I was able to locate the proper placement - and utilized the Activesheet command listed above and it is working now... thank you. Will list as problem solved.

+ 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