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

Closed
Fkhan777 Posts 2 Registration date Monday June 27, 2016 Status Member Last seen June 28, 2016 - Jun 27, 2016 at 10:33 PM
Fkhan777 Posts 2 Registration date Monday June 27, 2016 Status Member Last seen June 28, 2016 - Jun 28, 2016 at 08:32 PM
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



Related:

1 response

Blocked Profile
Jun 28, 2016 at 06:00 PM
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
0
Fkhan777 Posts 2 Registration date Monday June 27, 2016 Status Member Last seen June 28, 2016
Jun 28, 2016 at 08:32 PM
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' ?
0