Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy cell from file with variable name | Excel Worksheet Functions | |||
Recording a macro to copy into a series of variable ranges | Excel Programming | |||
How to automate with macro multiworksheet File using array variable? | Excel Programming | |||
VBA Macro to copy an column from one Excel file into another file | Excel Programming | |||
open file (as variable) from macro | Excel Discussion (Misc queries) |