Hi All:
Hopefully I can explain this and I am showing you enough code to get an answer
I am trying to alter this code in a couple of ways:
1) Is there a way to alter this code to make it more generic? I would like to go back to the workbook titled "IMPORT IFIS Receipt Register" regardless of the version date. I don't want to have to change the code if I alter the filename with a new version date. If it matters the workbook is already open when the code is running:
2) This portion of code is not working for me. Basically I am trying to copy the sheet from one file "IMPORT IFIS Receipt Register" and paste it at the end of the Workbook that WAS active (file name is identified in the code by fn (above):
I HOPE this makes sense but I doubt it because I was getting a little confused just typing it...
I may have to repost later and break it down a little more.
THANKS to anyone that can assist.
Take Care,
Mark
Hopefully I can explain this and I am showing you enough code to get an answer
I am trying to alter this code in a couple of ways:
Code:
'Rename Tab
With ActiveSheet
.Name = "IFIS Receipt Register"
End With
Range("A1").Select
'Copy IFIS Receipt Register Errors sheet to new file
Windows("IMPORT IFIS Receipt Register (verJuly 11th 2011).xls").Activate
Sheets("IFIS Receipt Register Errors").Copy after:=Sheets(Sheets.Count)
'Save file in Excel Format
fn = Replace(fn, ".txt", ".xls")
1) Is there a way to alter this code to make it more generic? I would like to go back to the workbook titled "IMPORT IFIS Receipt Register" regardless of the version date. I don't want to have to change the code if I alter the filename with a new version date. If it matters the workbook is already open when the code is running:
Code:
Windows("IMPORT IFIS Receipt Register [B][COLOR=red](verJuly 11th 2011).xls[/COLOR][/B]").Activate
2) This portion of code is not working for me. Basically I am trying to copy the sheet from one file "IMPORT IFIS Receipt Register" and paste it at the end of the Workbook that WAS active (file name is identified in the code by fn (above):
Code:
'Copy IFIS Receipt Register Errors sheet to new file
Windows("IMPORT IFIS Receipt Register (verJuly 11th 2011).xls").Activate
Sheets("IFIS Receipt Register Errors").[B]Copy after:=Sheets(Sheets.Count)[/B]
I HOPE this makes sense but I doubt it because I was getting a little confused just typing it...
I may have to repost later and break it down a little more.
THANKS to anyone that can assist.
Take Care,
Mark