Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have created few macros to prepare Pivot Table through Record Macro function. I want that these macros I should able to run every month in different files. Name of the files will be different. What can I do to make these macros perform every month for different files. Cheers, Mandeep |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi ManDeep
Save your routines in a personnal macros workbook (PERSONNAL.XLS) and place this workbook in the xlStart folder on your computer. Or: just start recording a new dummy macro and from the record dialog box select to record it into a personnal macros workbook, validate and then stop recording. You will then be able to copy your macros from the original workbook into the newly created workbook which will only be visible from the VB Editor. HTH Cordially Pascal "Mandeep Dhami" a écrit dans le message de news: ... Hi, I have created few macros to prepare Pivot Table through Record Macro function. I want that these macros I should able to run every month in different files. Name of the files will be different. What can I do to make these macros perform every month for different files. Cheers, Mandeep |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Papou,
Thanks for your reply. Sorry to say but I am not able to get your solution. Following is the script of my recorded macro would be able to make necessary amendment in the script so that this macro can be used to get pivot table from other files as well: Sub Pivot_Table_1() ' ' Pivot_Table_1 Macro ' Macro recorded 1/9/2008 by Mandeep ' ' Keyboard Shortcut: Ctrl+q ' Range("A3").Select Range(Selection, Selection.End(xlToRight)).Select Range(Selection, Selection.End(xlDown)).Select Range(Selection, Selection.End(xlDown)).Select ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase, SourceData:= _ "'Register'!R3C1:R65536C52").CreatePivotTable _ TableDestination:="", TableName:="PivotTable1", DefaultVersion:= _ xlPivotTableVersion10 ActiveSheet.PivotTableWizard TableDestination:=ActiveSheet.Cells(3, 1) ActiveSheet.Cells(3, 1).Select ActiveSheet.PivotTables("PivotTable1").AddFields RowFields:="Dist Line Type" _ , ColumnFields:="Invoice Source" ActiveSheet.PivotTables("PivotTable1").PivotFields ("Dist Line Type"). _ Orientation = xlDataField ActiveWorkbook.ShowPivotTableFieldList = True ActiveWorkbook.ShowPivotTableFieldList = False Application.CommandBars("PivotTable").Visible = False With ActiveSheet.PivotTables("PivotTable1").PivotFields ("Dist Line Type") .PivotItems("(blank)").Visible = False End With End Sub "papou" wrote: Hi ManDeep Save your routines in a personnal macros workbook (PERSONNAL.XLS) and place this workbook in the xlStart folder on your computer. Or: just start recording a new dummy macro and from the record dialog box select to record it into a personnal macros workbook, validate and then stop recording. You will then be able to copy your macros from the original workbook into the newly created workbook which will only be visible from the VB Editor. HTH Cordially Pascal "Mandeep Dhami" a écrit dans le message de news: ... Hi, I have created few macros to prepare Pivot Table through Record Macro function. I want that these macros I should able to run every month in different files. Name of the files will be different. What can I do to make these macros perform every month for different files. Cheers, Mandeep |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro to hyperlink individual files in multiple files | Excel Programming | |||
macro to hyperlink individual files in multiple files | Excel Programming | |||
Macro to open *.dat files and save as .txt (comma delimited text files) | Excel Programming | |||
Same macro in two files | Excel Programming | |||
Import multiple files macro can't find files | Excel Programming |