select method of range class failing ?

  • Thread starter Thread starter mark kubicki
  • Start date Start date
M

mark kubicki

i am creating this code by recording a macro -so obviously, it run...


but when i put it into code , it crashes:
"select method of range class failed" on the last line?


Sheets("KTA Issue").Select
Sheets("KTA Issue").Copy Before:=Sheets(1)
Sheets("KTA Issue (2)").Select
Sheets("KTA Issue (2)").Name = "1st Issue"
Sheets("1st Issue").Select
Range("A6:F8").Select

suggestions?
thanks in advance, -mark
 
which line crashes?

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
try this
Sub newsheet()
Sheets("KTA Issue").Copy Before:=Sheets(1)
ActiveSheet.Name = "1st Issue"
Range("A6:F8").Select
End Sub
 
Sheets("KTA Issue").Select
Sheets("KTA Issue").Copy Before:=Sheets(1)
Sheets("KTA Issue (2)").Select
Sheets("KTA Issue (2)").Name = "1st Issue"
Sheets("1st Issue").Select
Sheets("1st Issue").Range("A6:F8").Select
 
Your code works fine for me. Do you have controls or charts on
the sheet?


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
there are 2 control buttons, the next lines of code will delete them (but
that code could be moved they are not wanted on this sheet, but are on the
parent tht this was copied from)
 

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