PC Review


Reply
Thread Tools Rate Thread

automatic replacing of a VBE sub in all open workbooks

 
 
pls123
Guest
Posts: n/a
 
      27th Apr 2010
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 With Quote
 
 
 
 
JLGWhiz
Guest
Posts: n/a
 
      27th Apr 2010
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" <(E-Mail Removed)> wrote in message
news:7D63E8BF-19CE-4B28-A17E-(E-Mail Removed)...
> 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 With Quote
 
pls123
Guest
Posts: n/a
 
      13th May 2010
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" <(E-Mail Removed)> wrote in message
> news:7D63E8BF-19CE-4B28-A17E-(E-Mail Removed)...
> > 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
automatic replacing of vbe code for multiple workbooks pls123 Microsoft Excel Programming 1 17th Nov 2009 04:25 PM
VBA Workbooks.Open() / method 'open' of object 'workbooks' failed Luc Dindeman Microsoft Excel Crashes 0 25th Mar 2009 12:03 PM
Excel - replacing Text in workbooks =?Utf-8?B?RnJhbms=?= Microsoft Excel Worksheet Functions 1 7th Aug 2007 12:57 AM
Replacing (identical) values in multiple workbooks simultaneously? BR4M Microsoft Excel Programming 8 25th Nov 2004 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 Microsoft Excel Programming 2 15th Jun 2004 03:21 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:06 PM.