Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro Problem
Hi Everyone.
I do not know how to write a Macro, but I find it convenient to record one when I need it. I encountered a problem on recording the following Macro: Sub Copy2() ' ' Copy2 Macro ' Macro recorded 21/09/2008 by Albert Bartolo ' ' ActiveWorkbook.Save Sheets("Ships").Select ActiveWindow.ScrollWorkbookTabs Position:=xlLast Sheets(Array("Ships", "Phoenicia", "Salvo Grima", "Hotels", "Hard Rock", _ "Corinthia Flight Cat", "Airest", "La Salita - Arches", "Lemongrass Imported", _ "Lemongrass Local")).Select Sheets("Lemongrass Local").Activate Sheets(Array("Ships", "Phoenicia", "Salvo Grima", "Hotels", "Hard Rock", _ "Corinthia Flight Cat", "Airest", "La Salita - Arches", "Lemongrass Imported", _ "Lemongrass Local")).Copy ChDir "C:\Documents and Settings\Bartolo\Desktop\Quotations\Archive" ActiveWindow.Close ActiveWindow.ScrollWorkbookTabs Position:=xlFirst Sheets("Ships").Select End Sub If I copy the folder I am using this macro in, onto a pendrive or to another computer it does not work. I realised that the problem is the ChDir, which I marked in bold. Is there a possibility to modify the Macro so as it can work on any computer. Thank You Albert |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Worksheet Functions | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Discussion (Misc queries) | |||
Macro problem | Excel Discussion (Misc queries) | |||
Macro problem | Excel Worksheet Functions | |||
Macro Problem | Excel Worksheet Functions |