+ Reply to Thread
Results 1 to 5 of 5

Deactivate code, print and activate code again

  1. #1
    Forum Contributor
    Join Date
    09-18-2014
    Location
    Χαμένος στο διάστημα
    MS-Off Ver
    2016
    Posts
    383

    Deactivate code, print and activate code again

    Hello, i found this code for highlighting the row and column of active cell, can i have a button to deactivate the code before print the form, and after printing, can it be activated again?
    Please Login or Register  to view this content.
    Nick

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Deactivate code, print and activate code again

    Using this macro, you can press CTRL / w (not capitalized - no SHIFT key):

    Please Login or Register  to view this content.
    AND ... if you want the Print Preview Dialog Box to show also, add the single line of syntax:

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Logit; 11-27-2016 at 03:40 PM.

  3. #3
    Forum Contributor
    Join Date
    09-18-2014
    Location
    Χαμένος στο διάστημα
    MS-Off Ver
    2016
    Posts
    383

    Re: Deactivate code, print and activate code again

    Thanks, I will try it tomorrow and I will send you the results.

  4. #4
    Forum Contributor
    Join Date
    09-18-2014
    Location
    Χαμένος στο διάστημα
    MS-Off Ver
    2016
    Posts
    383

    Re: Deactivate code, print and activate code again

    Hello, i try your code in your wb, it really works very well. I move the module in my wb and after saving and restart the wb i select some cells for testing, press Ctrl+w and the wb dissappeared. I dont know what im doing wrong, please can you think what is this?

  5. #5
    Forum Contributor
    Join Date
    09-18-2014
    Location
    Χαμένος στο διάστημα
    MS-Off Ver
    2016
    Posts
    383

    Re: Deactivate code, print and activate code again

    Also if i have my wb and your wb together opened, module works fine in my wb..

+ 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] Temporarily deactivate a vba code while running a macro
    By Rookie11 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-07-2023, 08:22 PM
  2. Vba code to deactivate cell
    By manav1103 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-04-2016, 05:50 AM
  3. [SOLVED] If a Macro is executing, then deactivate Sheet 'Private Sub' code ? Is this possible ?
    By jcabroxo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-14-2015, 11:41 AM
  4. Activate or Deactivate a cell
    By aronyo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2011, 09:53 AM
  5. Workbook Activate/Deactivate strategy
    By foxguy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-13-2011, 03:34 PM
  6. activate/deactivate macros
    By cinciman22 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-17-2009, 02:55 PM
  7. activate/deactivate hyperlinks
    By JChandler22 in forum Excel General
    Replies: 1
    Last Post: 08-04-2007, 07:41 AM

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