Gaurav
Gaurav

Reputation: 1

macro opening other worksheets not working for other User

I have recorded a macro that basically opens up other worksheets and copy and pastes data into them before saving and closing them. It works perfectly for me but when a colleague tries to run the same macro with the same files it fails.

It opens up the first worksheet but then stops at the first command of - Application.Run "ConnectChartEvents. Any ideas why?

ChDir "\\dstm8307vpfs\EQData\EQUITYSWAPS\Client Folders\Proshares"
    Workbooks.Open Filename:= _
        "\\dstm8307vpfs\EQData\EQUITYSWAPS\Client Folders\Proshares\INTL_SWAPMTM_UBS.xlsm" _
        , UpdateLinks:=0
    Application.Run "ConnectChartEvents"
    ActiveWindow.ScrollWorkbookTabs Position:=xlLast
    Sheets("Allocations").Select
    Range("D3:D38").Select
    Selection.ClearContents
    ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
    Sheets("UltraShort FTSE Xinhua China 50").Select
    Range("G1048576").Select
    Selection.End(xlUp).Select
    ActiveCell.Offset(1, 0).Range("A1").Select
    ActiveCell.FormulaR1C1 = "='[DIVS - test.xlsm]Sheet1'!R13C2"
    ActiveCell.Select
    Selection.Copy
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    Application.CutCopyMode = False
    Sheets("Execution Commissions").Select
    ActiveWorkbook.Save
    ActiveWindow.Closesheet

Upvotes: 0

Views: 1544

Answers (1)

Fryin' Ryan
Fryin' Ryan

Reputation: 21

This is the error message you would get if the Bloomberg add-in was disabled or if you recorded the macro on a machine with the add-in and tried to run it on a machine without the add-in.

Upvotes: 2

Related Questions