Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Making a copy using macros
I am in dyer need of help. i have spent two days trying to complete a spreadsheet program based in excel-2000 Basically, what i need to do is just save a copy of the program in a file outside the base program in Value and Format, and keep the base program in its original state so that fresh data can be inputted to get fresh results. The only thing that will change in the base program when ultimately saved is YTD results that are held in one of the sheets, I have already recorded a macro that handles this data, and then have another macro that clears the data that has been inputted to get these results. The only thing i need is a way to copy the program and keep as a record of the period data that i have entered along with all the results before i close it and save it in a state so that i can duplicate the same actions. I am a total newbie with VBA, and have trouble understanding the help files Below is a macro that i recorded to try and complete the action i need to do. Can anyone HELP ME! legepe Sub Macro35() ' ' Macro35 Macro ' Macro recorded 23/10/2004 by Leigh Pender ' ' Workbooks.Add With Application UserName = "Leigh Pender" StandardFont = "Arial" StandardFontSize = "10" DefaultFilePath = "C:\Documents and Settings\Leigh Pender\My Documents" EnableSound = False RollZoom = False End With Windows("SlotPro1.xls").Activate Cells.Select Selection.Copy Windows("Book1").Activate Cells.Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False ActiveWindow.Zoom = 75 Sheets("Sheet2").Select Windows("SlotPro1.xls").Activate Sheets("Meter Readings").Select Cells.Select Application.CutCopyMode = False Selection.Copy Windows("Book1").Activate Cells.Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Sheets("Sheet3").Select Cells.Select Windows("SlotPro1.xls").Activate Sheets("Actual").Select Cells.Select Range("F1").Activate Application.CutCopyMode = False Selection.Copy Windows("Book1").Activate Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Sheets("Sheet4").Select Windows("SlotPro1.xls").Activate Sheets("Hopper").Select Cells.Select Application.CutCopyMode = False Selection.Copy Windows("Book1").Activate Cells.Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Sheets("Sheet5").Select Windows("SlotPro1.xls").Activate Sheets("Period-Results & Variences").Select Cells.Select Application.CutCopyMode = False Selection.Copy Windows("Book1").Activate Cells.Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False ActiveWindow.Zoom = 75 Sheets("Sheet6").Select Windows("SlotPro1.xls").Activate Sheets("YTD-Totals").Select Cells.Select Application.CutCopyMode = False Selection.Copy Windows("Book1").Activate Cells.Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Sheets("Sheet7").Select Windows("SlotPro1.xls").Activate Sheets("YTD-Results").Select Cells.Select Application.CutCopyMode = False Selection.Copy Windows("Book1").Activate Cells.Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False ActiveWindow.Zoom = 75 End Sub -- legepe ------------------------------------------------------------------------ legepe's Profile: http://www.excelforum.com/member.php...o&userid=15485 View this thread: http://www.excelforum.com/showthread...hreadid=271727 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Making macros unvisible | Excel Discussion (Misc queries) | |||
Making macros available to other excel files | Excel Discussion (Misc queries) | |||
Making Macros Available in All Workbooks | Excel Worksheet Functions | |||
Making macros available on lan in Excel 2000 | Excel Programming | |||
Making excel macros run Word macros | Excel Programming |