An idea to assist

mole999

Well-known Member
Joined
Oct 23, 2004
Messages
10,524
Office Version
  1. 2019
  2. 2016
  3. 2013
Platform
  1. Windows
OK, I create a complete new set of sheets and pivots when I update, apply formatting as its built which is fine. Problem is I'm using highlighting on the Pivot Filter to ensure all users can see where to look which is also fine, UNTIL the filter is changed.

As the new sheets have no code on them, is there a sensible way to monitor for worksheet change from ThisWorkbook or a module, so that once the sheet has changed the formatting will be reapplied
 

Attachments

  • Captureexcel.PNG
    Captureexcel.PNG
    2 KB · Views: 21

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
I'm trying to understand... you want to apply that "Yellow and Red border" next to pivotTable.

sheet has changed -- are you talking about Navigation or value/formatting.
 
Upvote 0
when I use the drop down to change the display of data the Red/Yellow are overwritten

As the sheet is created new every time I run the update the sheet has NO data on its module. When first built this is applied to the sheet, around the area shown
VBA Code:
Public Sub thickblockredborder()
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Color = RGB(255, 0, 0)
        .Weight = xlThick
    End With
        With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Color = RGB(255, 0, 0)
        .Weight = xlThick
    End With
        With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .Color = RGB(255, 0, 0)
        .Weight = xlThick
    End With
        With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .Color = RGB(255, 0, 0)
        .Weight = xlThick
   End With

    With Selection.Interior
        .Pattern = xlSolid
         .Color = RGB(255, 255, 0)
    End With
   End Sub

But I need to transfer
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
thickblockredborder
End Sub

to the designated sheet so it can monitor and update, as changes are applied by end users

It should be possible with applications extensibility 5.3 just can't figure out how to target a newly created sheet to have it added, to get it triggered
 
Upvote 0
Perhaps this ....


VBA Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)



 '''' "Mapping_sheet is just  sheet where you don't want to perform any action
  If Sh.Name <> "Mapping_sheet" Then
  
   
     ''' call here
      MsgBox "thickblockredborder"
   
    
  
  Else
   '''
    'No Action
  
  End If


End Sub
 
Last edited:
Upvote 0
Perhaps this ....


VBA Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)

'''' "Mapping_sheet is just  sheet where you don't want to perform any action
  If Sh.Name <> "Mapping_sheet" Then
  
     ''' call here
      MsgBox "thickblockredborder"
 
   
 
  Else
   '''
    'No Action
 
  End If


End Sub
Does that not have to be already installed on the sheet where the action is taking place, Doh jus reread and see its workbook, in which case that should work really well. Thank you
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,605
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top