Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,365
Default Totally Stuck...Help Please!

That's often a good idea, as is breaking complex worksheet formulas into
pieces to see which part(s) of those may be causing problems.

"urkec" wrote:

Sub Button2_Click()
With Sheets("Site Reading Log") 'source
.Rows(.Cells(Rows.Count, "a").End(xlUp).Row).Copy Sheets("sheet16").Rows(1)
'destination

End With


End Sub


I think you should break your code in steps to see which line gives you an
error:


Sub Button2_Click()

'Go to the first cell of the source sheet
Set rng = Worksheets("Source").Range("A1")

'Simulate ctrl + down arrow
'to get the index of the last row
rowToCopy = rng.End(xlDown).Row

'Copy the last row
Worksheets("Source").Rows(rowToCopy).Copy _
Worksheets("Dest").Rows(1)

End Sub


--
urkec

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
Totally Stuck...Help Please! JLatham Excel Programming 2 March 28th 07 02:19 AM
Totally Stuck...Help Please! Carlee Excel Programming 2 March 28th 07 12:58 AM
Totally Stuck...Help Please! Carlee Excel Programming 0 March 28th 07 12:16 AM
Totally Stumped Sondra Excel Discussion (Misc queries) 3 February 15th 06 02:01 PM
Highlighting blanks via GO TO SPECIAL is not highlighting blank cells - HELP, I'm totally stuck. Jamie Furlong Excel Discussion (Misc queries) 6 August 28th 05 09:27 PM


All times are GMT +1. The time now is 06:31 PM.

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"