ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   select method of range class failing ? (https://www.excelbanter.com/excel-programming/327893-select-method-range-class-failing.html)

Mark Kubicki

select method of range class failing ?
 
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 Befo=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



Bob Phillips[_6_]

select method of range class failing ?
 
which line crashes?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"mark kubicki" wrote in message
...
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 Befo=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





Don Guillett[_4_]

select method of range class failing ?
 
try this
Sub newsheet()
Sheets("KTA Issue").Copy Befo=Sheets(1)
ActiveSheet.Name = "1st Issue"
Range("A6:F8").Select
End Sub

--
Don Guillett
SalesAid Software

"mark kubicki" wrote in message
...
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 Befo=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





Tom Ogilvy

select method of range class failing ?
 
Sheets("KTA Issue").Select
Sheets("KTA Issue").Copy Befo=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


--
Regards,
Tom Ogilvy


"mark kubicki" wrote in message
...
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 Befo=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





Mark Kubicki

select method of range class failing ?
 
the last one: " Range("A6:F8").Select "



----------------------------------------------------------------------------
----------------------------------------

"Bob Phillips" wrote in message
...
which line crashes?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"mark kubicki" wrote in message
...
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 Befo=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







Chip Pearson

select method of range class failing ?
 
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


"mark kubicki" wrote in message
...
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 Befo=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





Mark Kubicki

select method of range class failing ?
 
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)



"Chip Pearson" wrote in message
...
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


"mark kubicki" wrote in message
...
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 Befo=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








All times are GMT +1. The time now is 03:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com