Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 121
Default automatic replacing of a VBE sub in all open workbooks

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 !
  #2   Report Post  
Posted to microsoft.public.excel.programming
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 !



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 121
Default automatic replacing of a VBE sub in all open workbooks

tx for help !


"JLGWhiz" wrote:

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 !



.

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
Excel2007; workbooks.count is not counting all open workbooks greg.campeau Excel Programming 2 August 2nd 08 08:37 PM
Excel - replacing Text in workbooks Frank Excel Worksheet Functions 1 August 7th 07 12:57 AM
Automatic replacing a file while in a macro JasperBlaas[_3_] Excel Programming 2 August 31st 05 03:16 PM
Replacing (identical) values in multiple workbooks simultaneously? BR4M Excel Programming 8 November 25th 04 04:35 PM
Excel 2003 Workbooks.Open with CorruptLoad=xlRepairFile fails on Excel 5.0/95 file due to Chart, with Error 1004 Method 'Open' of object 'Workbooks' failed Frank Jones Excel Programming 2 June 15th 04 03:21 AM


All times are GMT +1. The time now is 05:21 PM.

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

About Us

"It's about Microsoft Excel"