Create a macro which monitors the cell "c1" to be changed to "a" [Closed]

Report
Posts
2
Registration date
Monday June 27, 2016
Status
Member
Last seen
June 28, 2016
-
Posts
2
Registration date
Monday June 27, 2016
Status
Member
Last seen
June 28, 2016
-
Hello,
I hope someone can assist with this
In my workbook; I have two worksheets labeled "log" and "master"
I want to create a macro which monitors the cell "c1" to be changed to "a" or "A" in "log" worksheet and creates a new worksheet copying the contents of "master"
Any help in matter will be greatly appreciated
Regards
Fawaz



1 reply


Here is a simple one:

Private Sub Worksheet_Change(ByVal Target As Range)
    Dim KeyCells As Range

   
    Set KeyCells = Range("A1")
    
    If Not Application.Intersect(KeyCells, Range(Target.Address)) _
           Is Nothing Then
       
       'do your stuff here!
       
    End If
End Sub
 


It's kind of fun to do the impossible! -Walter Elias Disney
Posts
2
Registration date
Monday June 27, 2016
Status
Member
Last seen
June 28, 2016

thank you but i am not clear how this will implement

this is what i have so far

Dim ws1 As Worksheet
Set ws1 = ThisWorkbook.Worksheets("MASTER")
ws1.Copy ThisWorkbook.Sheets(Sheets.Count)

when i run it it creates the worksheet but doesn't rename it and i want to place the new worksheet between log and master. i think this can be done with 'BEFORE' ?

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!