Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Having trouble with simple macro!

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

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Having trouble with simple macro!

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 ToolsProtection 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

-----Original Message-----
I have recorded a macro to copy from one cell on a sheet

to another
sheet i have used the Ctrl+End then down to tell it where

to start but
upon next operation it fills the same cell...also i want

any previous
input by the macro to be unchangeable without a

password.......Can
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

Simon


---
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
Big Trouble with what I thought would be a simple Excel Formula Flip@work New Users to Excel 7 October 4th 08 09:06 PM
TROUBLE WITH A SIMPLE FORMULA [email protected] Excel Discussion (Misc queries) 0 March 13th 07 08:33 PM
Trouble with simple percentage formula moushia New Users to Excel 3 February 28th 07 01:56 AM
Simple Formula Trouble FP Novice Excel Discussion (Misc queries) 3 August 4th 06 03:16 PM
Trouble with simple If and Else AlanN Excel Programming 5 August 8th 03 06:20 PM


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