Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 126
Default How to start a makro

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 221
Default How to start a makro

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default How to start a makro

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 126
Default How to start a makro

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default How to start a makro

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 126
Default How to start a makro

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
creating a makro christine Excel Discussion (Misc queries) 1 April 14th 08 04:01 PM
Start Excel inside MSaccess with a makro Lars[_2_] Setting up and Configuration of Excel 0 March 3rd 07 01:40 PM
Start Excel2000 including a makro Lars[_2_] Setting up and Configuration of Excel 1 March 2nd 07 06:00 PM
If with a makro Tove Excel Discussion (Misc queries) 1 April 12th 05 01:49 PM
Makro Esrei Excel Discussion (Misc queries) 1 March 1st 05 12:34 PM


All times are GMT +1. The time now is 04:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"