Having trouble with simple macro!

  • Thread starter Thread starter Simon Lloyd
  • Start date Start date
S

Simon Lloyd

I have recorded a macro to copy from one cell on a sheet to anothe
sheet i have used the Ctrl+End then down to tell it where to start bu
upon next operation it fills the same cell...also i want any previou
input by the macro to be unchangeable without a password.......Ca
anyone help? heres the code!
Sub Entry()
'
' Entry Macro
' Macro recorded 01/03/2004 by Simon
'
' Keyboard Shortcut: Ctrl+r
'
Range("J17").Select
Selection.Copy
Sheets("2nd Skill last used").Select
Range("A1").Select
Selection.End(xlDown).Select
ActiveSheet.Paste
Sheets("User Sheet").Select
Range("C19").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("2nd Skill last used").Select
Range("D46").Select
ActiveSheet.Paste
Range("F46").Select
Sheets("User Sheet").Select
Range("N17").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("2nd Skill last used").Select
ActiveSheet.Paste
Range("G46").Select
Sheets("User Sheet").Select
Range("B28").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("2nd Skill last used").Select
ActiveSheet.Paste
Range("A47").Select
Sheets("User Sheet").Select
End Sub

Simo
 
If you go into a worksheet and do End-Down on a column of
data, it stops at the last populated row. If you want the
next blank row, you need to offset the range that the End
property returns.

So:
Selection.End(xlDown).Offset(1, 0).Select

would be the next empty row in the column.

Take a look at the Tools>Protection menu to learn about
password protecting your worksheet/workbook. When you
write "previous input by the macro", do you mean that
those are the only locked cells? If so, you'll have to
set the Locked property on each range you paste.

Hope that helps.

-Brad
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top