Runtime Error 1004 Method of Range of Object_Global_Failed

JRSqualid

New Member
Joined
Sep 3, 2003
Messages
30
Hi Im new to Macros and VBA so this may be obvious

I have just edited a recorded macro that copies various ranges of cells from on sheet to another (pasting them into different cells according to the resuld of a Vlookup) IT workef fine before but when a changed the range i got the error in the title.

HEres the code
Code:
Sub Macroupdatedependencyrecord()
    'This Macro updates the dependecies from the dependency file in the directory
    'Written by Jon Waller on 15/9/03
    
    Range("d2").Select
    Selection.Copy
    Sheets("filler").Select
    Range("E6").Select
    ActiveSheet.Paste
    Range("C6:d6").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Summary").Select
    Range("indirect(f2)").Select
    Selection.PasteSpecial Paste:=xlPasteValues, operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    Sheets("Filler").Select
    ActiveSheet.Range("f6:n6").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Summary").Select
    Range("indirect(g2)").Select
    Selection.PasteSpecial Paste:=xlPasteValues, operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    End Sub

The old code just missed out cell m6 so the orginal second qouted range was (F6:l6) the the select copy paste bit repeated for cell n6.
At first after i made the change nothing was being paste to M6 on the summary sheet but was all the other cells in the range. I rebooted the machine and I get the error also if I hit debug I get an exception violation and excel crashes.

Thanks

Squal
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Re: Runtime Error 1004 Method of Range of Object_Global_Fail

Thanks Juan

I need to copy the results from one line on the filler sheet to varialble lines one the Summary sheet . THe cell address that I need the start the range that i paste cell f2 and is the result of a vlookup. It did seem to work fine befor I made amendments and works on another woorkbook it is used in.

Cheers

Squal
 
Upvote 0
Re: Runtime Error 1004 Method of Range of Object_Global_Fail

No that didnt seem to work
If tried it twice the first time i got a small brown circle in the margin of the explore window with the code Range("f6:n6").Select High lighted in brown to.
Trying to find out what that means in my book
 
Upvote 0

Forum statistics

Threads
1,215,004
Messages
6,122,656
Members
449,091
Latest member
peppernaut

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top