Run-time error '1004': Method 'Range' of object'_Global'failed

NicoilGreco

New Member
Joined
Jun 8, 2015
Messages
1
Hi all and thanks in advance for your precious help. I'm trying without success to run the code below. Is there anyone who knows what's wrong?


Sub try1()


Dim ex_date As Range


Set ex_date = Range(Range("r51").Column, Range("r51").End(xlDown).Row)


Application.ActiveWorkbook.ActiveSheet.Range("ex_date").Select
Selection.Copy
Range("b51").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("b51").Select
Application.CutCopyMode = False


End Sub
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Code:
[COLOR=darkblue]Sub[/COLOR] try1()
[COLOR=darkblue]Dim[/COLOR] ex_date [COLOR=darkblue]As[/COLOR] Range

[COLOR=darkblue]Set[/COLOR] ex_date = Range(Range("r51"), Range("r51").End(xlDown).Row)

ex_date.Copy
Range("b51").PasteSpecial Paste:=xlPasteValues

Application.CutCopyMode = [COLOR=darkblue]False[/COLOR]

[COLOR=darkblue]End[/COLOR] [COLOR=darkblue]Sub[/COLOR]
 
Upvote 0

Forum statistics

Threads
1,214,782
Messages
6,121,532
Members
449,037
Latest member
tmmotairi

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