I'm trying to write a macro that compiles data in rows. The macro works fine but it overwrites the data that I put into the file from the previous time the macro was ran. The macro is writing to a select address of rows (ie row 3,4,5,) and I would like the macro to write to the next set of rows (6,7,8) without overwriting row 3,4,5. I hope that makes some sense. I'm just a beginner and I'm using the macro recorder in excel. any help would greatly be appreciated.
Thanks,
Auggie
PS here is the code and where I copy to the uniquantD_Base to rows B1132:B1136 is where I am having my problem I think. I'm wanting to keep a continous account of the previous data on this uniquant work sheet, but as I have it now I overwrite those cells addressed above. I'm sorry I'm not very good at explaining my problem, hopefully by posting this code it will help.
Sub scmacs()
'
' scmacs Macro
' Macro recorded 9/19/2002 by August Petersen
'
'
Workbooks.Open FileName:= _
"C:WINDOWSDesktopswm test2Uq Smelter Daily Pellet Lotus Note.xls"
Workbooks.Open FileName:= _
"C:WINDOWSDesktopswm test2Uq Smelter Daily Pellets 2002.xls"
Workbooks.Open FileName:="C:WINDOWSDesktopswm test2SMD pellets.xls"
Range("A1:K24").Select
Selection.Copy
Windows("Uq Smelter Daily Pellets 2002.xls").Activate
Sheets("export_data").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Sheets("Calculation Sheet").Select
Range("B5:CC9").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("UniquantD_Base").Select
Range("B1132").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ActiveWindow.ScrollColumn = 11
Range("B1132:B1136").Select
Sheets("UniquantD_Base").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Calc2_Sheet").Select
Range("B12").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("Report").Select
Range("B6:P25").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Uq Smelter Daily Pellet Lotus Note.xls").Activate
Range("B2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
End Sub
This message was edited by auggie on 2002-09-19 19:24
Thanks,
Auggie
PS here is the code and where I copy to the uniquantD_Base to rows B1132:B1136 is where I am having my problem I think. I'm wanting to keep a continous account of the previous data on this uniquant work sheet, but as I have it now I overwrite those cells addressed above. I'm sorry I'm not very good at explaining my problem, hopefully by posting this code it will help.
Sub scmacs()
'
' scmacs Macro
' Macro recorded 9/19/2002 by August Petersen
'
'
Workbooks.Open FileName:= _
"C:WINDOWSDesktopswm test2Uq Smelter Daily Pellet Lotus Note.xls"
Workbooks.Open FileName:= _
"C:WINDOWSDesktopswm test2Uq Smelter Daily Pellets 2002.xls"
Workbooks.Open FileName:="C:WINDOWSDesktopswm test2SMD pellets.xls"
Range("A1:K24").Select
Selection.Copy
Windows("Uq Smelter Daily Pellets 2002.xls").Activate
Sheets("export_data").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Sheets("Calculation Sheet").Select
Range("B5:CC9").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("UniquantD_Base").Select
Range("B1132").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ActiveWindow.ScrollColumn = 11
Range("B1132:B1136").Select
Sheets("UniquantD_Base").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Calc2_Sheet").Select
Range("B12").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("Report").Select
Range("B6:P25").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Uq Smelter Daily Pellet Lotus Note.xls").Activate
Range("B2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
End Sub
This message was edited by auggie on 2002-09-19 19:24