LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default VBA and creating a Macro

Sub findbottom_paste22()
Dim rng1 As Range
Dim rng2 As Range
With ActiveSheet
.Protect Password:="password", userinterfaceonly:=True
Set rng1 = .Cells(Rows.Count, 1).End(xlUp).Offset(1, 0) 'row below last
Set rng2 = .Cells(Rows.Count, 1).End(xlUp).EntireRow 'entire last row
End With
rng2.Copy Destination:=rng1 'copy last row to next row
End Sub

"password" is whatever you have set for a password

There is no "findbutton"

Maybe you mean "findbottom" which is part of the macro name.


Gord

On Tue, 27 Jan 2009 18:16:01 -0800, tommy
.(donotspam) wrote:

maybe this will help you understand better

rows 1 through 39 are ulocked

rows 40 through end are locked

when i click the command button, i want a new row inserted (in row 40)

copy row 39 and paste onto the new row 40

another thing, what is this findbutton ?




 
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
Help with creating a Macro Liz J[_2_] Excel Discussion (Misc queries) 6 November 2nd 08 09:34 PM
Creating a Macro? Lynda Excel Discussion (Misc queries) 2 July 21st 08 03:07 PM
VBA macro creating pdf Brad Excel Discussion (Misc queries) 9 June 18th 08 10:25 PM
Creating Macro Chey Excel Discussion (Misc queries) 1 January 18th 07 06:21 PM
Creating a macro Gene Goldenfeld New Users to Excel 10 May 5th 05 04:28 PM


All times are GMT +1. The time now is 03:12 PM.

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"