hi,
i have this application that i'm trying to automate for users to prevent user mistakes. basically, an excel file is received from clients. (arp0411.xls)
1 - the files is opened.
2 - rows one to four are deleted.
3 - the user has to copy a header row from another excel file (always the same). (arp_header.xls)
4 - the copied row is pasted to first row of the original file.
5 - row 2 of the file is deleted.
6 - the data is saved.
i recorded a macro and this is what it was produced:
my question is, how do i translate this into vbscript code?
i'm familiar with opening xcl sheets (i think). but not with these macros in vbs.
thanks.
i have this application that i'm trying to automate for users to prevent user mistakes. basically, an excel file is received from clients. (arp0411.xls)
1 - the files is opened.
2 - rows one to four are deleted.
3 - the user has to copy a header row from another excel file (always the same). (arp_header.xls)
4 - the copied row is pasted to first row of the original file.
5 - row 2 of the file is deleted.
6 - the data is saved.
i recorded a macro and this is what it was produced:
Code:
Sub Macro1()
Rows("1:4").Select
Selection.Delete Shift:=xlUp
Rows("1:1").Select
Selection.Copy
Windows("arp0411.xls").Activate
Rows("1:1").Select
ActiveSheet.Paste
Rows("2:2").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
End Sub
i'm familiar with opening xcl sheets (i think). but not with these macros in vbs.
thanks.