LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
oscardwilde
 
Posts: n/a
Default Macro works differently on different computers, same version of Ex

I have created macros that automate a fairly simple process on several
spreadsheets. There are three columns that are affected by the macro. One
column is total of all previous month's expenses for a project, the next is
the current month's expenses and the last column is total expenses to date.
The macro simply copies the values from the total expenses to the previous
month's column and zeros the current month so that it is ready for the next
month's expenses. The macros work great on my computer but do not always
perform the same way on other computers. Some fields it skips, others it
does not. The formatting and number of cells in each column are the same and
do not change. I've checked the security settings and the versions of Excel
are the same so why doesn't it do the same thing on two different computers
that use everything else the same?

Here's the code:

Sub ZeroDraw()
'
' ZeroDraw Macro
' Macro recorded 8/26/2005 by Oscar
'
' Keyboard Shortcut: Ctrl+d
'
Range("G7:G57").Select
Selection.Copy
ActiveWindow.ScrollRow = 27
ActiveWindow.ScrollRow = 26
ActiveWindow.ScrollRow = 25
ActiveWindow.ScrollRow = 24
ActiveWindow.ScrollRow = 23
ActiveWindow.ScrollRow = 21
ActiveWindow.ScrollRow = 20
ActiveWindow.ScrollRow = 18
ActiveWindow.ScrollRow = 16
ActiveWindow.ScrollRow = 15
ActiveWindow.ScrollRow = 14
ActiveWindow.ScrollRow = 12
ActiveWindow.ScrollRow = 11
ActiveWindow.ScrollRow = 9
ActiveWindow.ScrollRow = 7
ActiveWindow.ScrollRow = 5
ActiveWindow.ScrollRow = 4
ActiveWindow.ScrollRow = 3
ActiveWindow.ScrollRow = 2
ActiveWindow.ScrollRow = 1
Range("D7:D57").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("E7").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "0"
Selection.AutoFill Destination:=Range("E7:E56"), Type:=xlFillDefault
Range("E7:E56").Select
ActiveWindow.ScrollRow = 21
ActiveWindow.ScrollRow = 20
ActiveWindow.ScrollRow = 18
ActiveWindow.ScrollRow = 16
ActiveWindow.ScrollRow = 14
ActiveWindow.ScrollRow = 13
ActiveWindow.ScrollRow = 11
ActiveWindow.ScrollRow = 8
ActiveWindow.ScrollRow = 4
ActiveWindow.ScrollRow = 1
Range("K5").Select
ActiveCell.FormulaR1C1 = "=SUM(R[-1]C[-8]+1)"
Range("K5").Select
Selection.Copy
Range("K6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("K5").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("K6").Select
Selection.Cut
Range("C4").Select
ActiveSheet.Paste
With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Range("B1").Select
End Sub

 
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
Macro Help In Excel welshlad Excel Discussion (Misc queries) 14 October 26th 05 02:34 PM
Runtime error for macro that works in workbook created in Crystal Excel Discussion (Misc queries) 1 June 22nd 05 08:43 PM
Macro does not run when data refreshed Larry Lehman Excel Discussion (Misc queries) 0 January 16th 05 07:31 PM
Can't get simple macro to run Abi Excel Worksheet Functions 5 January 12th 05 07:37 PM
Macro and If Statement SATB Excel Discussion (Misc queries) 2 December 3rd 04 04:46 PM


All times are GMT +1. The time now is 02:25 PM.

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"