Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]() Hello to all. If possible could someone help here. This workbook is a bookin sheet for guests. Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range) ' VB TO COPY CONTENTS FROM LAST SHEET TO THIS ONE If ActiveCell.Row < 11 Then Exit Sub If ActiveCell.Row 64 Then Exit Sub If ActiveCell.Column 1 Then Exit Sub ActiveSheet.Unprotect Sheets(ActiveSheet.Index - 1).Rows(ActiveCell.Row).Copy ActiveSheet.Paste end sub As you can see here, this bit of code copies the row from previous sheet over the active sheet. This also works even when i am on sheet1, however there should be nothing to copy. Is it possible for the this code to look at what sheet it is on and if sheet1 then not execute. Many thanks Allan -- Allan R Jeffery ------------------------------------------------------------------------ Allan R Jeffery's Profile: http://www.excelforum.com/member.php...o&userid=37860 View this thread: http://www.excelforum.com/showthread...hreadid=574108 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Could someone HELP TRANSLATE this simple psuedo code into MACRO please?! | Excel Discussion (Misc queries) | |||
Can someone help me put psuedo code into actual excel macro?? | Excel Discussion (Misc queries) | |||
t-distribution puzzle in Excel | Excel Discussion (Misc queries) | |||
Macro for changing text to Proper Case | Excel Worksheet Functions | |||
Using other workbooks.. | Excel Worksheet Functions |