Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It's been years since I tried to do anything with excel that involved
any more than a simple macro, so this project is much harder that it would've been back then. I'm trying to copy the contents of a range of cells from one worksheet to another. My code looks like this: Private Sub Jenn_Qte() Application.ScreenUpdating = False ActiveSheet.Unprotect Password:="1234" 'unprotects the destination worksheet Sheets("Items, Cat").Select 'select source worksheet ActiveSheet.Unprotect Password:="1234" 'unprotect source worksheet Selection.AutoFilter Field:=1, Criteria1:="<" 'filter data, hide all blanks Range("A1,F96").Select 'THIS IS WHERE IT STOPS - supposed to select the filtered data Selection.Copy 'copy data Sheets("Quote").Select 'select destination worksheet Range("A14").Select 'select cell where data should be pasted Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Sheets("Items, Cat").Select 'back to the source worksheet Selection.AutoFilter Field:=1 'un-filter it Range("C3").Select 'cursor in this cell ActiveSheet.Protect Password:="1234" 'protect the worksheet Sheets("Quote Body").Select 'to the destination sheet again Range("F6").Select 'cursor in F6 please ActiveSheet.Protect Password:="1234" 'lock it back up :) Application.ScreenUpdating = True End Sub Is there a glaring problem there that I just don't see? Does anyone have any suggestions? Anything will be very appreciated. Thanks in advance, Jenn |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Range("Reset Sheet!F13").Select Makes VBA Code Fail | Excel Programming | |||
How to change "automax" to "autosum"? (probablyl wrong terminology) | Excel Discussion (Misc queries) | |||
use variable in Workbooks("book1").Worksheets("sheet1").Range("a1" | Excel Programming | |||
How do I select a range of cells without doing Range("a3", "f3").. | Excel Programming | |||
Using "Cells" to write "Range("A:A,H:H").Select" | Excel Programming |