Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 312
Default Message for Ron de Bruin

Hi Ron. Thanks for the help you have given me on a few questions I
had today. I now need to copy and paste data from several sheets
witin a workbook into a single master sheet. And low and behold, a
Google search on that topic brought me to your tips website!!

I have plagarized the following code from your site:

Sub Consolidate2()

Dim ws As Worksheet
Dim DestSh As Worksheet
Dim shLast As Long
Dim Last As Long

Application.ScreenUpdating = False
Set DestSh = Worksheets("Consolidate")
For Each ws In Worksheets
If ws.Name < DestSh.Name Then
Last = LastRow(DestSh)
shLast = LastRow(sh)
sh.Range(sh.Rows(3), sh.Rows(shLast)).Copy
DestSh.Cells(Last + 1, 1)
End If
Next
Application.ScreenUpdating = True

End Sub

When I run it, I get a "Sub or function not defined" error on the word
LastRow. Did I screw something up?

Thanks again!!

-Steph
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
Questioin for Ron de Bruin Jenny B. Excel Discussion (Misc queries) 7 June 19th 08 03:57 PM
For Ron Bruin Please Steved Excel Worksheet Functions 6 April 6th 05 02:19 AM
For Ron de Bruin Please Steved Excel Worksheet Functions 6 March 16th 05 12:46 AM
for Ron de Bruin Valeria[_2_] Excel Programming 1 January 22nd 04 04:42 PM
A Question for Ron de Bruin Jamal[_2_] Excel Programming 3 January 9th 04 04:12 PM


All times are GMT +1. The time now is 09: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"