Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Moving a sheet from a closed spreadsheet & making it part of an open one.
Friends,
I am attempting to take "sheet1" from the following closed Excel spreadsheet "C:\Automated\achchecks.xls" and make it "sheet1" of my open spreadsheet. Incidently, I do not have a "sheet1" in the open spreadsheet. Can anyone help? I have looked throughout this forum and have found some similar situations to my own but not entirely the same. In fact I have tried some of them and get subscript errors. Thanks, Mike --- Message posted from http://www.ExcelForum.com/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Moving a sheet from a closed spreadsheet & making it part of an open one.
Mike,
This actually takes a copy and does not move it. Sub testit() Dim wkb As Workbook Set wkb = Workbooks.Open("C:\Automated\achchecks.xls") wkb.Worksheets("Sheet1").Copy Befo=ThisWorkbook.Worksheets(1) wkb.Close SaveChanges:=False End Sub Rob "mjwillyone" wrote in message ... Friends, I am attempting to take "sheet1" from the following closed Excel spreadsheet "C:\Automated\achchecks.xls" and make it "sheet1" of my open spreadsheet. Incidently, I do not have a "sheet1" in the open spreadsheet. Can anyone help? I have looked throughout this forum and have found some similar situations to my own but not entirely the same. In fact I have tried some of them and get subscript errors. Thanks, Mike --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Moving a sheet from a closed spreadsheet & making it part of an open one.
This will work if both open
Sub CopyWB() Workbooks("TV1.xls").Sheets("Sheet1").Move _ Befo=ActiveWorkbook.Sheets("Sheet2") End Sub -- Don Guillett SalesAid Software "mjwillyone" wrote in message ... Friends, I am attempting to take "sheet1" from the following closed Excel spreadsheet "C:\Automated\achchecks.xls" and make it "sheet1" of my open spreadsheet. Incidently, I do not have a "sheet1" in the open spreadsheet. Can anyone help? I have looked throughout this forum and have found some similar situations to my own but not entirely the same. In fact I have tried some of them and get subscript errors. Thanks, Mike --- Message posted from http://www.ExcelForum.com/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Moving a sheet from a closed spreadsheet & making it part of an open one.
One way would be to open "achchecks.xls" long enough to copy the sheet over
and then close it again. Here's how: Replace "CurrFile.xls" with the name of your currently open file. Sub SheetFromClosedWbook() Application.ScreenUpdating = False Workbooks.Open Filename:="C:\Automated\achchecks.xls" Sheets("Sheet1").Copy Befo=Workbooks("CurrFile.xls").Sheets(1) Windows("C:\Automated\achchecks.xls").Activate ActiveWindow.Close Application.ScreenUpdating = True End Sub HTH "mjwillyone" wrote in message ... Friends, I am attempting to take "sheet1" from the following closed Excel spreadsheet "C:\Automated\achchecks.xls" and make it "sheet1" of my open spreadsheet. Incidently, I do not have a "sheet1" in the open spreadsheet. Can anyone help? I have looked throughout this forum and have found some similar situations to my own but not entirely the same. In fact I have tried some of them and get subscript errors. Thanks, Mike --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
spreadsheet part and part without grid lines | Excel Discussion (Misc queries) | |||
Making the AND function look at only part of a cell entry | Excel Discussion (Misc queries) | |||
Making part of a formula a variable | Excel Worksheet Functions | |||
Moving Sheet to Closed Workbook | Excel Discussion (Misc queries) | |||
How to open a spreadsheet on a named sheet from a hyperlink? | Links and Linking in Excel |