+ Reply to Thread
Results 1 to 6 of 6

Application.EnableEvents not workng correctly code too long? not written correctly?

  1. #1
    Registered User
    Join Date
    08-22-2019
    Location
    Michigan, US
    MS-Off Ver
    Excel
    Posts
    3

    Question Application.EnableEvents not workng correctly code too long? not written correctly?

    Please Login or Register  to view this content.
    Last edited by Richard Buttrey; 08-22-2019 at 11:54 AM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Application.EnableEvents not workng correctly code too long? not written correctly?

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Since this is your first post I'll add them but note for the future
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    08-22-2019
    Location
    Michigan, US
    MS-Off Ver
    Excel
    Posts
    3

    Re: Application.EnableEvents not workng correctly code too long? not written correctly?

    Thank you so much! I will be sure to format it properly in the future

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Application.EnableEvents not workng correctly code too long? not written correctly?

    Can you explain exactly what you want to achieve, (by that I don't mean tell us what the code is doing but what your overall aim is), and why you think an Application Enable Events instruction is necessary?

    That said this could almost certainly be simplified by starting the macro by making all sheets invisible (probably with a simple loop) then using the row number (5-54) and mapping that to a VBA sheet code name or sheet tab index number, and then making visible the relevant sheet.

  5. #5
    Registered User
    Join Date
    08-22-2019
    Location
    Michigan, US
    MS-Off Ver
    Excel
    Posts
    3

    Re: Application.EnableEvents not workng correctly code too long? not written correctly?

    Absolutely! In my workbook I have 45 or so sheets that I am using as questionnaire forms. My goal is that all of these forms (sheets) are invisible unless it is "requested". I wanted the sheets to be requested causing them to appear and no longer be invisible by inserting a #1 (is formatted to look like a checkmark) to the cell that is associated with that specific form. This way the only forms (sheets) that are visible are the forms that will need to be completed.
    So Column B5 - B54 is where the #1 (formatted to look like a checkmark) would be entered. Column D5 - D54 are where my form names (sheets) are listed. So if B5 is marked needed (#1) than D5 the form become visible.Attachment 638375

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Application.EnableEvents not workng correctly code too long? not written correctly?

    Please upload the workbook so that we have something to work with. We need to understand the layout and VBA sheet code names.
    It may hep if there is some common cell value to these sheets and the value is unique to only these sheets. That would make it much easier to hide all the sheets with a simple three line loop.

+ 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. [SOLVED] Application.EnableEvents and Application.ScreenUpdating doubt
    By no_Fate in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-04-2017, 01:18 PM
  2. [SOLVED] How to apply correctly INDIRECT in array with long formulas
    By Franky alta in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-28-2015, 05:13 PM
  3. Can't get code to do end correctly
    By superchew in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-14-2015, 12:41 PM
  4. Outlook VBA - Application.quit will not work correctly.
    By Rchie in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-28-2015, 11:12 AM
  5. [SOLVED] Showing Degrees correctly in cells for aviation application
    By Macgos in forum Excel General
    Replies: 2
    Last Post: 04-05-2012, 07:28 AM
  6. Application.Statusbar not updating correctly
    By tryer in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-08-2011, 03:13 AM
  7. Compiling Excel 2003 application written in VBA 6.0 Code
    By Heinzpeter in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-07-2005, 03:05 PM

Tags for this Thread

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