![]() |
How can I test if a Macro if firing?
I was given this code from another post "How do I convert a cell(s) from
the formula to it's contents?" . Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column < 1 Then Exit Sub With Sheets("Output_5Tab") .Range(Target.Address).Value = Target.Value End With End Sub When I change in my input sheet "Int_5Tab" I get no indication that anything is happening in the output file "Output_5Tab"??? Any recommendations ? |
How can I test if a Macro if firing?
Maybe write to the statusbar?
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column < 1 Then Exit Sub With Sheets("Sheet2") '"Output_5Tab") .Range(Target.Address).Value = Target.Value Application.StatusBar = Target.Address & " copied to Output_5Tab" End With End Sub -- HTH Bob Phillips (remove nothere from the email address if mailing direct) "ZZBC" wrote in message ... I was given this code from another post "How do I convert a cell(s) from the formula to it's contents?" . Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column < 1 Then Exit Sub With Sheets("Output_5Tab") .Range(Target.Address).Value = Target.Value End With End Sub When I change in my input sheet "Int_5Tab" I get no indication that anything is happening in the output file "Output_5Tab"??? Any recommendations ? |
How can I test if a Macro if firing?
Bob Phillips wrote:
Maybe write to the statusbar? Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column < 1 Then Exit Sub With Sheets("Sheet2") '"Output_5Tab") .Range(Target.Address).Value = Target.Value Application.StatusBar = Target.Address & " copied to Output_5Tab" End With End Sub -- HTH Bob Phillips (remove nothere from the email address if mailing direct) "ZZBC" wrote in message ... I was given this code from another post "How do I convert a cell(s) from the formula to it's contents?" . Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column < 1 Then Exit Sub With Sheets("Output_5Tab") .Range(Target.Address).Value = Target.Value End With End Sub When I change in my input sheet "Int_5Tab" I get no indication that anything is happening in the output file "Output_5Tab"??? Any recommendations ? Got NOTHING! so, I guess the Macro is not firing ? I read something at one time about 'turning on Macros' ... ??? ... could something like that be the problem? I am running Win 98 SE, and Excell 2000 |
How can I test if a Macro if firing?
Bob
In troubleshooting, like you are doing, just put a MsgBox command as the first line of your macro. Remove the line after you get things working. Use a line like: MsgBox "It's running!" Then, if the macro fires, the first thing it does is display the message box. HTH Otto "ZZBC" wrote in message ... Bob Phillips wrote: Maybe write to the statusbar? Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column < 1 Then Exit Sub With Sheets("Sheet2") '"Output_5Tab") .Range(Target.Address).Value = Target.Value Application.StatusBar = Target.Address & " copied to Output_5Tab" End With End Sub -- HTH Bob Phillips (remove nothere from the email address if mailing direct) "ZZBC" wrote in message ... I was given this code from another post "How do I convert a cell(s) from the formula to it's contents?" . Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column < 1 Then Exit Sub With Sheets("Output_5Tab") .Range(Target.Address).Value = Target.Value End With End Sub When I change in my input sheet "Int_5Tab" I get no indication that anything is happening in the output file "Output_5Tab"??? Any recommendations ? Got NOTHING! so, I guess the Macro is not firing ? I read something at one time about 'turning on Macros' ... ??? ... could something like that be the problem? I am running Win 98 SE, and Excell 2000 |
How can I test if a Macro if firing?
Otto Moehrbach wrote:
Bob In troubleshooting, like you are doing, just put a MsgBox command as the first line of your macro. Remove the line after you get things working. Use a line like: MsgBox "It's running!" Then, if the macro fires, the first thing it does is display the message box. HTH Otto "ZZBC" wrote in message ... Bob Phillips wrote: Maybe write to the statusbar? Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column < 1 Then Exit Sub With Sheets("Sheet2") '"Output_5Tab") .Range(Target.Address).Value = Target.Value Application.StatusBar = Target.Address & " copied to Output_5Tab" End With End Sub -- HTH Bob Phillips (remove nothere from the email address if mailing direct) "ZZBC" wrote in message ... I was given this code from another post "How do I convert a cell(s) from the formula to it's contents?" . Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column < 1 Then Exit Sub With Sheets("Output_5Tab") .Range(Target.Address).Value = Target.Value End With End Sub When I change in my input sheet "Int_5Tab" I get no indication that anything is happening in the output file "Output_5Tab"??? Any recommendations ? Got NOTHING! so, I guess the Macro is not firing ? I read something at one time about 'turning on Macros' ... ??? ... could something like that be the problem? I am running Win 98 SE, and Excell 2000 Thanks! |
How can I test if a Macro if firing?
Are you sure you have the worksheet event code in a worksheet code module?
-- HTH Bob Phillips (remove nothere from the email address if mailing direct) "ZZBC" wrote in message ... Bob Phillips wrote: Maybe write to the statusbar? Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column < 1 Then Exit Sub With Sheets("Sheet2") '"Output_5Tab") .Range(Target.Address).Value = Target.Value Application.StatusBar = Target.Address & " copied to Output_5Tab" End With End Sub -- HTH Bob Phillips (remove nothere from the email address if mailing direct) "ZZBC" wrote in message ... I was given this code from another post "How do I convert a cell(s) from the formula to it's contents?" . Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column < 1 Then Exit Sub With Sheets("Output_5Tab") .Range(Target.Address).Value = Target.Value End With End Sub When I change in my input sheet "Int_5Tab" I get no indication that anything is happening in the output file "Output_5Tab"??? Any recommendations ? Got NOTHING! so, I guess the Macro is not firing ? I read something at one time about 'turning on Macros' ... ??? ... could something like that be the problem? I am running Win 98 SE, and Excell 2000 |
How can I test if a Macro if firing?
Bob Phillips wrote:
Are you sure you have the worksheet event code in a worksheet code module? -- HTH Bob Phillips (remove nothere from the email address if mailing direct) "ZZBC" wrote in message ... Bob Phillips wrote: Maybe write to the statusbar? Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column < 1 Then Exit Sub With Sheets("Sheet2") '"Output_5Tab") .Range(Target.Address).Value = Target.Value Application.StatusBar = Target.Address & " copied to Output_5Tab" End With End Sub -- HTH Bob Phillips (remove nothere from the email address if mailing direct) "ZZBC" wrote in message ... I was given this code from another post "How do I convert a cell(s) from the formula to it's contents?" . Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column < 1 Then Exit Sub With Sheets("Output_5Tab") .Range(Target.Address).Value = Target.Value End With End Sub When I change in my input sheet "Int_5Tab" I get no indication that anything is happening in the output file "Output_5Tab"??? Any recommendations ? Got NOTHING! so, I guess the Macro is not firing ? I read something at one time about 'turning on Macros' ... ??? ... could something like that be the problem? I am running Win 98 SE, and Excell 2000 Thanks for taking the time to make a suggestion! I found the problem ... I had the security level set to high ... macros not turned on .... a real DUMMY! |
All times are GMT +1. The time now is 11:45 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com