Macro run time error 1004

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am getting the above error with - Method 'range' of object'_global' faile

When I debug it the highlighted area is the secong to last line in the script below

Workbooks.Open Filename:=
"N:\PCINFO\Jhyf8\New files\Organisation Dir - BIW.xls
Range("G3").Selec
Selection.CurrentRegion.Selec
Application.CutCopyMode = Fals
Selection.Cop
Windows("Organisation Directory main.xls").Activat
x = ActiveCell.End(xlDown).Row + 1 'for row numbe
'x = ActiveCell.End(xlDown).Offset(1).Address 'for addres
Range("A" & x).Selec
ActiveSheet.Past

Can anybody see where the problem is
 
I think you will need to add a line of code to trap the error tha
occurs if the column is empty.
If you key Ctrl + End in an empty column you arrive at the bottom ro
65536 of a sheet, when the +1 has no meaning
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top