Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Code not going to next unused row

Hi ng
using xl 2003

My code is not pasting to next unused row
Should begin pasting row 9

Every time I run the code pastes further down and down

What am I doing wrong?

Sub Add_Employee()
Worksheets("mytools").Activate
Range("A1:J7").Select
With Range("A1:J7")
.Copy
End With

Worksheets("Time_Entry").Activate
Cells(Cells.SpecialCells(xlCellTypeLastCell).Row, 1).Select
ActiveSheet.Paste
Application.CutCopyMode = False
End Su

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Code not going to next unused row

Try adding "+1" after the .Row in your SpeccialCells line

eg.

Cells(Cells.SpecialCells(xlCellTypeLastCell).Row+1 , 1).Select

"goss " wrote in message
...
Hi ng
using xl 2003

My code is not pasting to next unused row
Should begin pasting row 9

Every time I run the code pastes further down and down

What am I doing wrong?

Sub Add_Employee()
Worksheets("mytools").Activate
Range("A1:J7").Select
With Range("A1:J7")
Copy
End With

Worksheets("Time_Entry").Activate
Cells(Cells.SpecialCells(xlCellTypeLastCell).Row, 1).Select
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub


---
Message posted from http://www.ExcelForum.com/



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
Copying to next unused row Ken[_2_] Excel Worksheet Functions 5 June 24th 08 08:11 AM
Finding the last unused row in a column rojobrown Excel Worksheet Functions 8 October 7th 06 01:20 PM
what to do with unused cells B Excel Worksheet Functions 1 June 22nd 06 12:09 AM
Eliminate unused columns jlbreyer Excel Discussion (Misc queries) 3 June 20th 05 07:16 PM
find next unused row Mike[_33_] Excel Programming 2 July 16th 03 05:01 AM


All times are GMT +1. The time now is 05:32 AM.

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

About Us

"It's about Microsoft Excel"