Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50327

Sub Script out of range!

$
0
0
Hi all,
Im a newbie with VBA and have recorded the follow script using the macro recorder in excel. Basically i am grabbing data from another workbook and pasting it back into the original.
The macro works a treat on my pc, but when a colleague tries to run it on hers she gets the good ole “Run-time error 9, sub-script out of range”.
I have instructed her to open both files using the file/open method to ensure both are open in the same instance of Excel..
Any help really really appreciated! as im starting to look like an idiot now promising the world and delivering errors! haha
Code below
Thanks,
Dave

Code:

Sub Grab_super_data()
'
' Grab_super_data Macro
' Grabs super unit prices and FUM tab from the AES Valuation history XLS
'
' Keyboard Shortcut: Ctrl+Shift+S
'
    Workbooks("AESValuationHistory.xlsm").Activate
    Sheets("Unit Price & FUM").Select
    Cells.Select
    Selection.Copy
    Workbooks("Performance Uploader v3.0.xlsm").Activate
    Sheets("Unit Price & FUM").Select
    Cells.Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    Range("A1").Select
    Sheets("Control Sheet").Select
    Range("A1").Select
End Sub


Viewing all articles
Browse latest Browse all 50327

Latest Images

Trending Articles



Latest Images