Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 304
Default Copy pasted name range

Having a problem with the following. It errors out but I'm not sure why?
Thanks

FYI, the sheets that are beeing delete are hiden, so is "Analysis Graphs".

Sheets("Betsy").Select
Range("B5").Select
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Sheets("Analysis").Delete
Sheets("David").Delete
Sheets("Jackie").Delete
Sheets("Jenni").Delete
Sheets("Julio").Delete
Sheets("Tally").Delete
Sheets.Add
Sheets("Sheet1").Select
Sheets("Sheet1").Name = "Analysis Stats"
Application.DisplayAlerts = True
Sheets("Analysis Graphs").Select
Range("BetsyR1").Select
Selection.Copy
Sheets("Analysis Stats").Select
ActiveSheet.Paste
ActiveWindow.Zoom = 70
Cells.Select
Selection.Interior.ColorIndex = 2
Range("A2").Selec
Sheets("Analysis Stats").Move After:=Sheets(3)
Sheets("Analysis Graphs").Delete
Application.DisplayAlerts = True
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Copy pasted name range

Try this...

Application.ScreenUpdating = False
Application.DisplayAlerts = False
Sheets("Analysis").Delete
Sheets("David").Delete
Sheets("Jackie").Delete
Sheets("Jenni").Delete
Sheets("Julio").Delete
Sheets("Tally").Delete
Sheets.Add
Sheets("Sheet1").Name = "Analysis Stats"
With Sheets("Analysis Stats")
Sheets("Analysis Graphs").Range("BetsyR1").Copy Desintation:=.Range("A1")
.Select
ActiveWindow.Zoom = 70
.Cells.Interior.ColorIndex = 2
.Range("A2").Select
.Move After:=Sheets(3)
End With
Sheets("Analysis Graphs").Delete
Application.DisplayAlerts = True

--
HTH...

Jim Thomlinson


"pgarcia" wrote:

Having a problem with the following. It errors out but I'm not sure why?
Thanks

FYI, the sheets that are beeing delete are hiden, so is "Analysis Graphs".

Sheets("Betsy").Select
Range("B5").Select
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Sheets("Analysis").Delete
Sheets("David").Delete
Sheets("Jackie").Delete
Sheets("Jenni").Delete
Sheets("Julio").Delete
Sheets("Tally").Delete
Sheets.Add
Sheets("Sheet1").Select
Sheets("Sheet1").Name = "Analysis Stats"
Application.DisplayAlerts = True
Sheets("Analysis Graphs").Select
Range("BetsyR1").Select
Selection.Copy
Sheets("Analysis Stats").Select
ActiveSheet.Paste
ActiveWindow.Zoom = 70
Cells.Select
Selection.Interior.ColorIndex = 2
Range("A2").Selec
Sheets("Analysis Stats").Move After:=Sheets(3)
Sheets("Analysis Graphs").Delete
Application.DisplayAlerts = True

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 304
Default Copy pasted name range

Sorry I took so long to write back.

I get:

Run-time error '1004':
Application-defined or object-defined error

Thanks


"Jim Thomlinson" wrote:

Try this...

Application.ScreenUpdating = False
Application.DisplayAlerts = False
Sheets("Analysis").Delete
Sheets("David").Delete
Sheets("Jackie").Delete
Sheets("Jenni").Delete
Sheets("Julio").Delete
Sheets("Tally").Delete
Sheets.Add
Sheets("Sheet1").Name = "Analysis Stats"
With Sheets("Analysis Stats")
Sheets("Analysis Graphs").Range("BetsyR1").Copy Desintation:=.Range("A1")
.Select
ActiveWindow.Zoom = 70
.Cells.Interior.ColorIndex = 2
.Range("A2").Select
.Move After:=Sheets(3)
End With
Sheets("Analysis Graphs").Delete
Application.DisplayAlerts = True

--
HTH...

Jim Thomlinson


"pgarcia" wrote:

Having a problem with the following. It errors out but I'm not sure why?
Thanks

FYI, the sheets that are beeing delete are hiden, so is "Analysis Graphs".

Sheets("Betsy").Select
Range("B5").Select
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Sheets("Analysis").Delete
Sheets("David").Delete
Sheets("Jackie").Delete
Sheets("Jenni").Delete
Sheets("Julio").Delete
Sheets("Tally").Delete
Sheets.Add
Sheets("Sheet1").Select
Sheets("Sheet1").Name = "Analysis Stats"
Application.DisplayAlerts = True
Sheets("Analysis Graphs").Select
Range("BetsyR1").Select
Selection.Copy
Sheets("Analysis Stats").Select
ActiveSheet.Paste
ActiveWindow.Zoom = 70
Cells.Select
Selection.Interior.ColorIndex = 2
Range("A2").Selec
Sheets("Analysis Stats").Move After:=Sheets(3)
Sheets("Analysis Graphs").Delete
Application.DisplayAlerts = True

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Copy pasted name range

I'm not Jim, but if I were, I'd ask what line caused the error.

If it's this area:
With Sheets("Analysis Stats")
Sheets("Analysis Graphs").Range("BetsyR1").Copy Desintation:=.Range("A1")
.Select


Try correcting the spelling of Destination.

pgarcia wrote:

Sorry I took so long to write back.

I get:

Run-time error '1004':
Application-defined or object-defined error

Thanks

"Jim Thomlinson" wrote:

Try this...

Application.ScreenUpdating = False
Application.DisplayAlerts = False
Sheets("Analysis").Delete
Sheets("David").Delete
Sheets("Jackie").Delete
Sheets("Jenni").Delete
Sheets("Julio").Delete
Sheets("Tally").Delete
Sheets.Add
Sheets("Sheet1").Name = "Analysis Stats"
With Sheets("Analysis Stats")
Sheets("Analysis Graphs").Range("BetsyR1").Copy Desintation:=.Range("A1")
.Select
ActiveWindow.Zoom = 70
.Cells.Interior.ColorIndex = 2
.Range("A2").Select
.Move After:=Sheets(3)
End With
Sheets("Analysis Graphs").Delete
Application.DisplayAlerts = True

--
HTH...

Jim Thomlinson


"pgarcia" wrote:

Having a problem with the following. It errors out but I'm not sure why?
Thanks

FYI, the sheets that are beeing delete are hiden, so is "Analysis Graphs".

Sheets("Betsy").Select
Range("B5").Select
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Sheets("Analysis").Delete
Sheets("David").Delete
Sheets("Jackie").Delete
Sheets("Jenni").Delete
Sheets("Julio").Delete
Sheets("Tally").Delete
Sheets.Add
Sheets("Sheet1").Select
Sheets("Sheet1").Name = "Analysis Stats"
Application.DisplayAlerts = True
Sheets("Analysis Graphs").Select
Range("BetsyR1").Select
Selection.Copy
Sheets("Analysis Stats").Select
ActiveSheet.Paste
ActiveWindow.Zoom = 70
Cells.Select
Selection.Interior.ColorIndex = 2
Range("A2").Selec
Sheets("Analysis Stats").Move After:=Sheets(3)
Sheets("Analysis Graphs").Delete
Application.DisplayAlerts = True


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
URGENT: #REF! ERROR WHEN COPY AND PASTED CAPTGNVR Excel Programming 3 July 16th 07 09:01 AM
copy active cell value,find the pasted value in different worksheet [email protected] Excel Worksheet Functions 2 July 9th 06 09:56 AM
How do I determine the Range that was pasted Mike[_106_] Excel Programming 0 March 31st 06 01:39 AM
Copy enabled / Pasted disabled Ben Excel Programming 4 November 30th 05 10:37 AM
How to copy paste from Excel and leave the pasted data editable? Cropduster Excel Worksheet Functions 3 June 11th 05 10:03 AM


All times are GMT +1. The time now is 10:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"