View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default automatic replacing of a VBE sub in all open workbooks

You can write another Sub procedure and call it from a third procedure based
on conditions:

Sub master()
If Range("A1") < "Condition" Then
Macro1
Else
Macro2
End If
End Sub

Sub Macro1()
MsgBox "Macro1"
Range("A1") = "Condition")
End Sub

Sub Macro2
MsgBox "Macro2"
Range("1").ClearContents
End Sub


"pls123" wrote in message
...
hi all !
i know how to make automatic replacing of a cell for all open workbooks..

now i neeed to replace a sub with another 1 with a little difference..

is there a way to make it ?
tx !