Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
When I delete a name in a cell I have made a makro that is doing some
"cleening up". How can I make this makro start when the name is deleted? Or do I really need a button to make the makro starting? |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
G'day John
You could use the Worksheet_Change event. Something like Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("YourRange")) Is Nothing Then Application.Run "YourMacro" End If End Sub ("YourRange") can be multiple Cells ("A1" , "K20", Z1:Z100) HTH Mark. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
you need to put some code in the worksheet "CHANGE" event...
something like this - Private Sub Worksheet_Change(ByVal Target As Range) Call MY_MACRO 'where MY_MACRO is the name of your "Clean up" macro. End Sub This code MUST go in the worksheet_Change event for the actual sheet you are working on. Muppet Man. On Sep 26, 7:08*pm, johnny wrote: When I delete a name in a cell I have made a makro that is doing some "cleening up". How can I make this makro start when the name is deleted? Or do I really need a button to make the makro starting? |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I finally make the makro start and function in a way... But I want it to
start only when the value in the cell is deleted, how can I make that happend? MuppetMan skrev: you need to put some code in the worksheet "CHANGE" event... something like this - Private Sub Worksheet_Change(ByVal Target As Range) Call MY_MACRO 'where MY_MACRO is the name of your "Clean up" macro. End Sub This code MUST go in the worksheet_Change event for the actual sheet you are working on. Muppet Man. On Sep 26, 7:08 pm, johnny wrote: When I delete a name in a cell I have made a makro that is doing some "cleening up". How can I make this makro start when the name is deleted? Or do I really need a button to make the makro starting? |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" And Target.Value = "" Then macroname End If End Sub Gord Dibben MS Excel MVP On Sat, 27 Sep 2008 09:11:00 -0700, johnny wrote: I finally make the makro start and function in a way... But I want it to start only when the value in the cell is deleted, how can I make that happend? MuppetMan skrev: you need to put some code in the worksheet "CHANGE" event... something like this - Private Sub Worksheet_Change(ByVal Target As Range) Call MY_MACRO 'where MY_MACRO is the name of your "Clean up" macro. End Sub This code MUST go in the worksheet_Change event for the actual sheet you are working on. Muppet Man. On Sep 26, 7:08 pm, johnny wrote: When I delete a name in a cell I have made a makro that is doing some "cleening up". How can I make this makro start when the name is deleted? Or do I really need a button to make the makro starting? |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Everythings works just fine now, thanx everyone!!
Gord Dibben skrev: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$A$1" And Target.Value = "" Then macroname End If End Sub Gord Dibben MS Excel MVP On Sat, 27 Sep 2008 09:11:00 -0700, johnny wrote: I finally make the makro start and function in a way... But I want it to start only when the value in the cell is deleted, how can I make that happend? MuppetMan skrev: you need to put some code in the worksheet "CHANGE" event... something like this - Private Sub Worksheet_Change(ByVal Target As Range) Call MY_MACRO 'where MY_MACRO is the name of your "Clean up" macro. End Sub This code MUST go in the worksheet_Change event for the actual sheet you are working on. Muppet Man. On Sep 26, 7:08 pm, johnny wrote: When I delete a name in a cell I have made a makro that is doing some "cleening up". How can I make this makro start when the name is deleted? Or do I really need a button to make the makro starting? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
creating a makro | Excel Discussion (Misc queries) | |||
Start Excel inside MSaccess with a makro | Setting up and Configuration of Excel | |||
Start Excel2000 including a makro | Setting up and Configuration of Excel | |||
If with a makro | Excel Discussion (Misc queries) | |||
Makro | Excel Discussion (Misc queries) |