W
wilson4j
I need a solution for this code where Workbooks("newitemform.xls").Sheets(2),
the file name of the active workbook can be different. Is there a way so that
instead of this fixed file name, the active workbook name could be pulled in
here?
The file name could be names of product and not the standard "newitemform"
name.
Private Sub CommandButton8_Click()
'
' getpattern01 Macro
' Macro recorded 1/9/2008 by 7-Eleven, Inc.
'
'
ChDir "C:\data\newitemsetup"
Workbooks.Open Filename:="C:\data\newitemsetup\Pattern_Sheets.XLS", _
UpdateLinks:=0
Sheets("aptrn01").Select
Sheets("aptrn01").Copy After:=Workbooks("newitemform.xls").Sheets(2)
ActiveWindow.ActivateNext
Application.DisplayAlerts = False
ActiveWorkbook.Close
Application.DisplayAlerts = True
End Sub
the file name of the active workbook can be different. Is there a way so that
instead of this fixed file name, the active workbook name could be pulled in
here?
The file name could be names of product and not the standard "newitemform"
name.
Private Sub CommandButton8_Click()
'
' getpattern01 Macro
' Macro recorded 1/9/2008 by 7-Eleven, Inc.
'
'
ChDir "C:\data\newitemsetup"
Workbooks.Open Filename:="C:\data\newitemsetup\Pattern_Sheets.XLS", _
UpdateLinks:=0
Sheets("aptrn01").Select
Sheets("aptrn01").Copy After:=Workbooks("newitemform.xls").Sheets(2)
ActiveWindow.ActivateNext
Application.DisplayAlerts = False
ActiveWorkbook.Close
Application.DisplayAlerts = True
End Sub