Ryan,
Thanks for help but that does not point me to the right direction. I have a
sub called CreateTempSheet (shown below) and it's kind of doing the job but
not to the fullest extent.
Private Sub CommandButton_Click()
Dim ddifn As String
Dim ddifnWkBk As Workbook
ddifn = Application.GetOpenFilename(FileFilter:="Excel Files, *.xls", _
Title:="Please select layer stackup file received from fab shop")
Set ddifnWkBk = Workbooks.Open(ddifn, , ReadOnly)
Call CreateTempSheet
End Sub
Sub CreateTempSheet()
Sheets("Sheet1").Select
Sheets("Sheet1").Copy
Sheets("Sheet1").Copy Before:=Workbooks("ddi_march_23.xlsm").Sheets(2)
Sheets("Sheet1").Name = "Temp"
End Sub
I am opening a workbook shown above then calling the sub CreateTempSheet
which I'd like to use to copy sheet1 from the .xls file opened then paste as
Temp worksheet in the current excel file.
Any help is appreciated.
"ryguy7272" wrote:
> There may be a few solutions:
> http://www.rondebruin.nl/copy7.htm
>
> Or:
> http://www.rondebruin.nl/ado.htm
>
> If neither of those options work for you, post back with a little more detail.
>
> HTH,
> Ryan---
> --
> Ryan---
> If this information was helpful, please indicate this by clicking ''Yes''.
>
>
> "Varun" wrote:
>
> > Guys,
> >
> > How can I copy lets say sheet1 from excel file named one.xls and paste to a
> > different excel file named two.xls wherein the sheet name also changes from
> > sheet1 to Temp? Been try to do this but cannot get it to work.
> >
> > Earlier in 2003, I got the code via recording a macro but in excel 2007 I am
> > unable to figure out how to copy sheet using macro.
> >
> > Thanks.