+ Reply to Thread
Results 1 to 4 of 4

Private sub code no longer working (print area macro)

  1. #1
    Registered User
    Join Date
    10-10-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    65

    Private sub code no longer working (print area macro)

    Hi

    I found this code to dynamically change the print area.

    It was working fine on the day i inserted the code, ive saved it as a macro enabled workbook etc

    The sheets so longer update for some reason

    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim Isect As Range
    Set Isect = Application.Intersect(Target, [D:D])
    If Not Isect Is Nothing Then
    Range("B" & Target.Row) = Now
    End If
    End Sub

    Please help
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Private sub code no longer working (print area macro)

    Do you have enable events turned off?
    You can check with:
    Please Login or Register  to view this content.
    if they are turned off use this to turn them on
    Please Login or Register  to view this content.
    Note - restarting excel will reset enableevents to true.

  3. #3
    Registered User
    Join Date
    10-10-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    65

    Re: Private sub code no longer working (print area macro)

    Hi, My events are enabled, i ran the second code just incase, restarted excel but still wont work

  4. #4
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Private sub code no longer working (print area macro)

    Ok, there doesn't seem to be anything in the code that would change the printarea. What the code does is if you change something in column D then it will add the date in column B for that particular row.

    What is your code supposed to do?

+ 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] Print array code for a series of pages that will also determine print area required?
    By matrixpom in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-04-2012, 11:46 PM
  2. [SOLVED] Set Print Area macro Code
    By romandotcom in forum Excel General
    Replies: 8
    Last Post: 06-21-2012, 12:09 AM
  3. VBA Code no longer working
    By jdbel in forum Excel General
    Replies: 16
    Last Post: 11-16-2011, 07:33 PM
  4. macro code to set print area and print
    By DrPips in forum Excel General
    Replies: 0
    Last Post: 09-06-2009, 02:36 AM
  5. Print Area:What would be the code for setting the print area
    By wammer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-02-2005, 02:05 AM

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