Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default problem with macro

I have a macro that copies rows of data from one location in a sheet into
another location. And for years this has worked fine, until about a couple
months ago it no longer would copy the Date and time. i looked that the macro
code and it looks the same as any of the other files that have this function
in it. I'm a little baffled on why it would just do it now.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default problem with macro

Would you be willing to show us the code, and the error message you
get?

/ Tyla /


On Mar 22, 12:44 pm, Cameron
wrote:
I have a macro that copies rows of data from one location in a sheet into
another location. And for years this has worked fine, until about a couple
months ago it no longer would copy the Date and time. i looked that the macro
code and it looks the same as any of the other files that have this function
in it. I'm a little baffled on why it would just do it now.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default problem with macro

If you have not downloaded addins or upgraded your software version then the
file could be corrupt. Try copying the macro from its current workbook to a
new workbook and see if it will run in the new workbook.

"Cameron" wrote:

I have a macro that copies rows of data from one location in a sheet into
another location. And for years this has worked fine, until about a couple
months ago it no longer would copy the Date and time. i looked that the macro
code and it looks the same as any of the other files that have this function
in it. I'm a little baffled on why it would just do it now.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default problem with macro

Option Explicit






'
' Macro1 Macro
' Macro recorded 5/1/97 by Weyerhaeuser Canada Ltd.
' Macro to print graphs and report sheet
'
Sub Macro1()
Sheets("charts").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1
Sheets("A").Select
ActiveSheet.Unprotect
Rows("19:41").Select
Selection.EntireRow.Hidden = False
With Toolbars(8)
.Left = 635
.Top = 10
End With
ActiveWindow.SelectedSheets.PrintOut Copies:=1
Rows("19:41").Select
Selection.EntireRow.Hidden = True
With Toolbars(8)
.Left = 635
.Top = 10
End With

End Sub
'
' Macro2 Macro
' Macro recorded 5/1/97 by Weyerhaeuser Canada Ltd.
' Macro to Update sheet A
'
Sub Macro2()
Sheets("A").Select
ActiveSheet.Unprotect
Range("a85:ad1200").Select
Selection.Copy
Range("a86").Select
ActiveSheet.Paste
Range("B85:ad85").Select
Selection.ClearContents
Application.Goto Reference:="R41C2"
Range("B41:ad41").Select
Selection.Copy
Application.Goto Reference:="R85C2"
ActiveSheet.Paste
Range("m85").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("o85").Select
Selection.ClearContents
Range("q85").Select
Selection.ClearContents
Range("d85").Select
Selection.ClearContents
Range("b85").Select
Selection.ClearContents
Range("y85").Select
Selection.ClearContents
Range("ab85").Select
Selection.ClearContents
Range("B12:h40").Select
Selection.Copy
Range("B13").Select
ActiveSheet.Paste
Range("B12:h12").Select
Selection.ClearContents
Range("j12:l40").Select
Selection.Copy
Range("j13").Select
ActiveSheet.Paste
Range("j12:l12").Select
Selection.ClearContents
Range("n12:n40").Select
Selection.Copy
Range("n13").Select
ActiveSheet.Paste
Range("n12").Select
Selection.ClearContents
Range("p12:p40").Select
Selection.Copy
Range("p13").Select
ActiveSheet.Paste
Range("p12").Select
Selection.ClearContents
Range("r12:r40").Select
Selection.Copy
Range("r13").Select
ActiveSheet.Paste
Range("r12").Select
Selection.ClearContents
Range("t12:u40").Select
Selection.Copy
Range("t13").Select
ActiveSheet.Paste
Range("t12:u12").Select
Selection.ClearContents
Range("w12:x40").Select
Selection.Copy
Range("w13").Select
ActiveSheet.Paste
Range("w12:x12").Select
Selection.ClearContents
Range("z12:aa40").Select
Selection.Copy
Range("z13").Select
ActiveSheet.Paste
Range("z12:aa12").Select
Selection.ClearContents

Range("ac12:ad40").Select
Selection.Copy
Range("ac13").Select
ActiveSheet.Paste
Range("ac12:ad12").Select
Selection.ClearContents
Sheets("A").Select
Range("b12:b12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("C12:h12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("j12:l12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("n12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("p12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("r12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("t12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("u12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("w12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("x12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("z12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("aa12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("ac12:ad12").Select
Selection.Locked = False
Selection.FormulaHidden = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Range("b12").Select


End Sub

'
' Macro3 Macro
' Macro recorded 5/18/97 by Weyerhaeuser
' Macro to Unhide
'
Sub Macro3()
Sheets("A").Select
ActiveSheet.Unprotect
Rows("18:41").Select
Selection.EntireRow.Hidden = False
Range("L12").Select

End Sub

'
' Macro4 Macro
' Macro recorded 5/20/97 by Weyerhaeuser
' Macro to Hide
'
Sub Macro4()
Sheets("A").Select
ActiveSheet.Unprotect
Rows("19:41").Select
Selection.EntireRow.Hidden = True
Application.Goto Reference:="R1C1"
Application.Goto Reference:="R12C2"

End Sub

'
' Macro5 Macro
' Macro recorded 5/20/97 by Weyerhaeuser
' Save copy macro
'
Sub Macro5()
Sheets("A").Select
ActiveSheet.Unprotect
ActiveWorkbook.SaveAs Filename:="3-8REP2.XLS", FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:= _
False, CreateBackup:=False
ActiveWorkbook.SaveAs Filename:="3-8REP.XLS", FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios _
:=True
End Sub

'
' Macro6 Macro
' Macro recorded 30/05/97 by Weyerhaeuser Canada Ltd.
' Macro to save
'
Sub Macro6()
Sheets("A").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios _
:=True

ActiveWorkbook.Save
End Sub

Sub Macro9()
'
' Macro9 Macro
' Macro recorded 1/10/03 by MccaulM
'
ActiveSheet.Unprotect
Range("B13:h41").Select
Selection.Copy
Range("B12").Select
ActiveSheet.Paste
Range("B85:h85").Select
Selection.Copy
Range("B41").Select
ActiveSheet.Paste
Range("j13:l41").Select
Selection.Copy
Range("j12").Select
ActiveSheet.Paste
Range("j85:l85").Select
Selection.Copy
Range("j41").Select
ActiveSheet.Paste
Range("n13:n41").Select
Selection.Copy
Range("n12").Select
ActiveSheet.Paste
Range("n85:n85").Select
Selection.Copy
Range("n41").Select
ActiveSheet.Paste
Range("p13:p41").Select
Selection.Copy
Range("p12").Select
ActiveSheet.Paste
Range("p85:p85").Select
Selection.Copy
Range("p41").Select
ActiveSheet.Paste
Range("r13:r41").Select
Selection.Copy
Range("r12").Select
ActiveSheet.Paste
Range("r85").Select
Selection.Copy
Range("r41").Select
ActiveSheet.Paste
Range("t13:u41").Select
Selection.Copy
Range("t12").Select
ActiveSheet.Paste
Range("t85:u85").Select
Selection.Copy
Range("t41").Select
ActiveSheet.Paste

Range("w13:x41").Select
Selection.Copy
Range("w12").Select
ActiveSheet.Paste
Range("w85:x85").Select
Selection.Copy
Range("w41").Select
ActiveSheet.Paste
Range("z13:aa41").Select
Selection.Copy
Range("z12").Select
ActiveSheet.Paste
Range("z85:aa85").Select
Selection.Copy
Range("z41").Select
ActiveSheet.Paste

Range("ac13:ad41").Select
Selection.Copy
Range("ac12").Select
ActiveSheet.Paste
Range("ac85:ad85").Select
Selection.Copy
Range("ac41").Select
ActiveSheet.Paste

Range("B86:Ad1150").Select
Selection.Copy
Range("B85").Select
ActiveSheet.Paste
Range("A1").Select
ActiveSheet.Protect

End Sub

This is what I have for code, but for some odd reason as data is entered to
the sheet it is losing the date and time and those values are found in column
B and D.

However, I am getting little green arrows on the values in Column B



"Tyla" wrote:

Would you be willing to show us the code, and the error message you
get?

/ Tyla /


On Mar 22, 12:44 pm, Cameron
wrote:
I have a macro that copies rows of data from one location in a sheet into
another location. And for years this has worked fine, until about a couple
months ago it no longer would copy the Date and time. i looked that the macro
code and it looks the same as any of the other files that have this function
in it. I'm a little baffled on why it would just do it now.




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default problem with macro

Cameron,

Thanks for the macros. While verbose, I'm not seeing anything
surprising there.
A couple thoughts:


On Mar 22, 2:04 pm, Cameron wrote:
Option Explicit

'
' Macro1 Macro
' Macro recorded 5/1/97 by Weyerhaeuser Canada Ltd.
' Macro to print graphs and report sheet
'
Sub Macro1()
Sheets("charts").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1
Sheets("A").Select
ActiveSheet.Unprotect
Rows("19:41").Select
Selection.EntireRow.Hidden = False
With Toolbars(8)
.Left = 635
.Top = 10
End With
ActiveWindow.SelectedSheets.PrintOut Copies:=1
Rows("19:41").Select
Selection.EntireRow.Hidden = True
With Toolbars(8)
.Left = 635
.Top = 10
End With

End Sub
'
' Macro2 Macro
' Macro recorded 5/1/97 by Weyerhaeuser Canada Ltd.
' Macro to Update sheet A
'
Sub Macro2()
Sheets("A").Select
ActiveSheet.Unprotect
Range("a85:ad1200").Select
Selection.Copy
Range("a86").Select
ActiveSheet.Paste
Range("B85:ad85").Select
Selection.ClearContents
Application.Goto Reference:="R41C2"
Range("B41:ad41").Select
Selection.Copy
Application.Goto Reference:="R85C2"
ActiveSheet.Paste
Range("m85").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("o85").Select
Selection.ClearContents
Range("q85").Select
Selection.ClearContents
Range("d85").Select
Selection.ClearContents
Range("b85").Select
Selection.ClearContents
Range("y85").Select
Selection.ClearContents
Range("ab85").Select
Selection.ClearContents
Range("B12:h40").Select
Selection.Copy
Range("B13").Select
ActiveSheet.Paste
Range("B12:h12").Select
Selection.ClearContents
Range("j12:l40").Select
Selection.Copy
Range("j13").Select
ActiveSheet.Paste
Range("j12:l12").Select
Selection.ClearContents
Range("n12:n40").Select
Selection.Copy
Range("n13").Select
ActiveSheet.Paste
Range("n12").Select
Selection.ClearContents
Range("p12:p40").Select
Selection.Copy
Range("p13").Select
ActiveSheet.Paste
Range("p12").Select
Selection.ClearContents
Range("r12:r40").Select
Selection.Copy
Range("r13").Select
ActiveSheet.Paste
Range("r12").Select
Selection.ClearContents
Range("t12:u40").Select
Selection.Copy
Range("t13").Select
ActiveSheet.Paste
Range("t12:u12").Select
Selection.ClearContents
Range("w12:x40").Select
Selection.Copy
Range("w13").Select
ActiveSheet.Paste
Range("w12:x12").Select
Selection.ClearContents
Range("z12:aa40").Select
Selection.Copy
Range("z13").Select
ActiveSheet.Paste
Range("z12:aa12").Select
Selection.ClearContents

Range("ac12:ad40").Select
Selection.Copy
Range("ac13").Select
ActiveSheet.Paste
Range("ac12:ad12").Select
Selection.ClearContents
Sheets("A").Select
Range("b12:b12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("C12:h12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("j12:l12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("n12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("p12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("r12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("t12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("u12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("w12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("x12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("z12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("aa12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("ac12:ad12").Select
Selection.Locked = False
Selection.FormulaHidden = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Range("b12").Select

End Sub

'
' Macro3 Macro
' Macro recorded 5/18/97 by Weyerhaeuser
' Macro to Unhide
'
Sub Macro3()
Sheets("A").Select
ActiveSheet.Unprotect
Rows("18:41").Select
Selection.EntireRow.Hidden = False
Range("L12").Select

End Sub

'
' Macro4 Macro
' Macro recorded 5/20/97 by Weyerhaeuser
' Macro to Hide
'
Sub Macro4()
Sheets("A").Select
ActiveSheet.Unprotect
Rows("19:41").Select
Selection.EntireRow.Hidden = True
Application.Goto Reference:="R1C1"
Application.Goto Reference:="R12C2"

End Sub

'
' Macro5 Macro
' Macro recorded 5/20/97 by Weyerhaeuser
' Save copy macro
'
Sub Macro5()
Sheets("A").Select
ActiveSheet.Unprotect
ActiveWorkbook.SaveAs Filename:="3-8REP2.XLS", FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:= _
False, CreateBackup:=False
ActiveWorkbook.SaveAs Filename:="3-8REP.XLS", FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios _
:=True
End Sub

'
' Macro6 Macro
' Macro recorded 30/05/97 by Weyerhaeuser Canada Ltd.
' Macro to save
'
Sub Macro6()
Sheets("A").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios _
:=True

ActiveWorkbook.Save
End Sub

Sub Macro9()
'
' Macro9 Macro
' Macro recorded 1/10/03 by MccaulM
'
ActiveSheet.Unprotect
Range("B13:h41").Select
Selection.Copy
Range("B12").Select
ActiveSheet.Paste
Range("B85:h85").Select
Selection.Copy
Range("B41").Select
ActiveSheet.Paste
Range("j13:l41").Select
Selection.Copy
Range("j12").Select
ActiveSheet.Paste
Range("j85:l85").Select
Selection.Copy
Range("j41").Select
ActiveSheet.Paste
Range("n13:n41").Select
Selection.Copy
Range("n12").Select
ActiveSheet.Paste
Range("n85:n85").Select
Selection.Copy
Range("n41").Select
ActiveSheet.Paste
Range("p13:p41").Select
Selection.Copy
Range("p12").Select
ActiveSheet.Paste
Range("p85:p85").Select
Selection.Copy
Range("p41").Select
ActiveSheet.Paste
Range("r13:r41").Select
Selection.Copy
Range("r12").Select
ActiveSheet.Paste
Range("r85").Select
Selection.Copy
Range("r41").Select
ActiveSheet.Paste
Range("t13:u41").Select
Selection.Copy
Range("t12").Select
ActiveSheet.Paste
Range("t85:u85").Select
Selection.Copy
Range("t41").Select
ActiveSheet.Paste

Range("w13:x41").Select
Selection.Copy
Range("w12").Select
ActiveSheet.Paste
Range("w85:x85").Select
Selection.Copy
Range("w41").Select
ActiveSheet.Paste
Range("z13:aa41").Select
Selection.Copy
Range("z12").Select
ActiveSheet.Paste
Range("z85:aa85").Select
Selection.Copy
Range("z41").Select
ActiveSheet.Paste

Range("ac13:ad41").Select
Selection.Copy
Range("ac12").Select
ActiveSheet.Paste
Range("ac85:ad85").Select
Selection.Copy
Range("ac41").Select
ActiveSheet.Paste

Range("B86:Ad1150").Select
Selection.Copy
Range("B85").Select
ActiveSheet.Paste
Range("A1").Select
ActiveSheet.Protect

End Sub

This is what I have for code, but for some odd reason as data is entered to
the sheet it is losing the date and time and those values are found in column
B and D.

However, I am getting little green arrows on the values in Column B

"Tyla" wrote:
Would you be willing to show us the code, and the error message you
get?


/Tyla/


On Mar 22, 12:44 pm, Cameron
wrote:
I have a macro that copies rows of data from one location in a sheet into
another location. And for years this has worked fine, until about a couple
months ago it no longer would copy the Date and time. i looked that the macro
code and it looks the same as any of the other files that have this function
in it. I'm a little baffled on why it would just do it now.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default problem with macro

Sorry about that last post ...

Some thoughts: COuld it simply be a case of cell formatting? Are the
cells with the "lost" date and time formatted the same as the ones
where it appears normally?
When you say "green arrows" are your meaning green triangles in the
upper left corner of the cells? This typically indicates a data type
error, perhaps because it has a formula bringing in data that itself
is the wrong type for the given formula. This can be as a simple as
someone entering a space in a cell rather than just deleting a value.
Visually they are the same, fomr an Excel formula point of view, the
blank is a string and these can cause problems in a variety of cell
formulas.
Others may have better insight than this. My two cents, though, is to
carefully cehck your raw data and make sure it's not the old "garbage
in, garboue out" situation - bedeviling as those sometimes are.

/ Tyla /

On Mar 22, 2:04 pm, Cameron wrote:
Option Explicit

'
' Macro1 Macro
' Macro recorded 5/1/97 by Weyerhaeuser Canada Ltd.
' Macro to print graphs and report sheet
'
Sub Macro1()
Sheets("charts").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1
Sheets("A").Select
ActiveSheet.Unprotect
Rows("19:41").Select
Selection.EntireRow.Hidden = False
With Toolbars(8)
.Left = 635
.Top = 10
End With
ActiveWindow.SelectedSheets.PrintOut Copies:=1
Rows("19:41").Select
Selection.EntireRow.Hidden = True
With Toolbars(8)
.Left = 635
.Top = 10
End With

End Sub
'
' Macro2 Macro
' Macro recorded 5/1/97 by Weyerhaeuser Canada Ltd.
' Macro to Update sheet A
'
Sub Macro2()
Sheets("A").Select
ActiveSheet.Unprotect
Range("a85:ad1200").Select
Selection.Copy
Range("a86").Select
ActiveSheet.Paste
Range("B85:ad85").Select
Selection.ClearContents
Application.Goto Reference:="R41C2"
Range("B41:ad41").Select
Selection.Copy
Application.Goto Reference:="R85C2"
ActiveSheet.Paste
Range("m85").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("o85").Select
Selection.ClearContents
Range("q85").Select
Selection.ClearContents
Range("d85").Select
Selection.ClearContents
Range("b85").Select
Selection.ClearContents
Range("y85").Select
Selection.ClearContents
Range("ab85").Select
Selection.ClearContents
Range("B12:h40").Select
Selection.Copy
Range("B13").Select
ActiveSheet.Paste
Range("B12:h12").Select
Selection.ClearContents
Range("j12:l40").Select
Selection.Copy
Range("j13").Select
ActiveSheet.Paste
Range("j12:l12").Select
Selection.ClearContents
Range("n12:n40").Select
Selection.Copy
Range("n13").Select
ActiveSheet.Paste
Range("n12").Select
Selection.ClearContents
Range("p12:p40").Select
Selection.Copy
Range("p13").Select
ActiveSheet.Paste
Range("p12").Select
Selection.ClearContents
Range("r12:r40").Select
Selection.Copy
Range("r13").Select
ActiveSheet.Paste
Range("r12").Select
Selection.ClearContents
Range("t12:u40").Select
Selection.Copy
Range("t13").Select
ActiveSheet.Paste
Range("t12:u12").Select
Selection.ClearContents
Range("w12:x40").Select
Selection.Copy
Range("w13").Select
ActiveSheet.Paste
Range("w12:x12").Select
Selection.ClearContents
Range("z12:aa40").Select
Selection.Copy
Range("z13").Select
ActiveSheet.Paste
Range("z12:aa12").Select
Selection.ClearContents

Range("ac12:ad40").Select
Selection.Copy
Range("ac13").Select
ActiveSheet.Paste
Range("ac12:ad12").Select
Selection.ClearContents
Sheets("A").Select
Range("b12:b12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("C12:h12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("j12:l12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("n12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("p12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("r12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("t12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("u12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("w12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("x12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("z12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("aa12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("ac12:ad12").Select
Selection.Locked = False
Selection.FormulaHidden = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Range("b12").Select

End Sub

'
' Macro3 Macro
' Macro recorded 5/18/97 by Weyerhaeuser
' Macro to Unhide
'
Sub Macro3()
Sheets("A").Select
ActiveSheet.Unprotect
Rows("18:41").Select
Selection.EntireRow.Hidden = False
Range("L12").Select

End Sub

'
' Macro4 Macro
' Macro recorded 5/20/97 by Weyerhaeuser
' Macro to Hide
'
Sub Macro4()
Sheets("A").Select
ActiveSheet.Unprotect
Rows("19:41").Select
Selection.EntireRow.Hidden = True
Application.Goto Reference:="R1C1"
Application.Goto Reference:="R12C2"

End Sub

'
' Macro5 Macro
' Macro recorded 5/20/97 by Weyerhaeuser
' Save copy macro
'
Sub Macro5()
Sheets("A").Select
ActiveSheet.Unprotect
ActiveWorkbook.SaveAs Filename:="3-8REP2.XLS", FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:= _
False, CreateBackup:=False
ActiveWorkbook.SaveAs Filename:="3-8REP.XLS", FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios _
:=True
End Sub

'
' Macro6 Macro
' Macro recorded 30/05/97 by Weyerhaeuser Canada Ltd.
' Macro to save
'
Sub Macro6()
Sheets("A").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios _
:=True

ActiveWorkbook.Save
End Sub

Sub Macro9()
'
' Macro9 Macro
' Macro recorded 1/10/03 by MccaulM
'
ActiveSheet.Unprotect
Range("B13:h41").Select
Selection.Copy
Range("B12").Select
ActiveSheet.Paste
Range("B85:h85").Select
Selection.Copy
Range("B41").Select
ActiveSheet.Paste
Range("j13:l41").Select
Selection.Copy
Range("j12").Select
ActiveSheet.Paste
Range("j85:l85").Select
Selection.Copy
Range("j41").Select
ActiveSheet.Paste
Range("n13:n41").Select
Selection.Copy
Range("n12").Select
ActiveSheet.Paste
Range("n85:n85").Select
Selection.Copy
Range("n41").Select
ActiveSheet.Paste
Range("p13:p41").Select
Selection.Copy
Range("p12").Select
ActiveSheet.Paste
Range("p85:p85").Select
Selection.Copy
Range("p41").Select
ActiveSheet.Paste
Range("r13:r41").Select
Selection.Copy
Range("r12").Select
ActiveSheet.Paste
Range("r85").Select
Selection.Copy
Range("r41").Select
ActiveSheet.Paste
Range("t13:u41").Select
Selection.Copy
Range("t12").Select
ActiveSheet.Paste
Range("t85:u85").Select
Selection.Copy
Range("t41").Select
ActiveSheet.Paste

Range("w13:x41").Select
Selection.Copy
Range("w12").Select
ActiveSheet.Paste
Range("w85:x85").Select
Selection.Copy
Range("w41").Select
ActiveSheet.Paste
Range("z13:aa41").Select
Selection.Copy
Range("z12").Select
ActiveSheet.Paste
Range("z85:aa85").Select
Selection.Copy
Range("z41").Select
ActiveSheet.Paste

Range("ac13:ad41").Select
Selection.Copy
Range("ac12").Select
ActiveSheet.Paste
Range("ac85:ad85").Select
Selection.Copy
Range("ac41").Select
ActiveSheet.Paste

Range("B86:Ad1150").Select
Selection.Copy
Range("B85").Select
ActiveSheet.Paste
Range("A1").Select
ActiveSheet.Protect

End Sub

This is what I have for code, but for some odd reason as data is entered to
the sheet it is losing the date and time and those values are found in column
B and D.

However, I am getting little green arrows on the values in Column B

"Tyla" wrote:
Would you be willing to show us the code, and the error message you
get?


/Tyla/


On Mar 22, 12:44 pm, Cameron
wrote:
I have a macro that copies rows of data from one location in a sheet into
another location. And for years this has worked fine, until about a couple
months ago it no longer would copy the Date and time. i looked that the macro
code and it looks the same as any of the other files that have this function
in it. I'm a little baffled on why it would just do it now.



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
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Worksheet Functions 1 May 3rd 08 02:35 PM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Discussion (Misc queries) 1 May 3rd 08 10:52 AM
Macro Problem carl Excel Worksheet Functions 6 July 27th 07 05:18 PM
Color Row Macro Problem, adapted from Patrick Malloy macro SteveC Excel Programming 4 June 21st 06 12:28 PM
Problem in updating all worksheets of a workbook using a macro that calls another macro [email protected] Excel Programming 3 March 20th 06 05:21 AM


All times are GMT +1. The time now is 10:41 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"