Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello
This is my code... ChDir "C:\Temp" Workbooks.OpenText Filename:="C:\Temp\myfile.txt", Origin:=xlWindows, _ StartRow:=1, DataType:=xlFixedWidth, FieldInfo:=Array(Array(0, 1), Array(8, _ 1), Array(12, 1), Array(17, 1), Array(21, 1), Array(29, 1), Array(38, 1), Array(46, 1), _ Array(50, 1), Array(58, 1), Array(67, 1)) Range("A2").Select Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select Selection.Copy Windows("daily.xls").Activate Sheets("table").Select Worksheets("table").Unprotect Range("t2").Select ActiveSheet.Paste It was working fine until I added sheet protection and the Worksheets("table").Unprotect part. Now I get "Paste method od Worksheet class failed." What is causing this and how do I fix it? Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro stops at random places. | Excel Discussion (Misc queries) | |||
Macro repeats and then stops | Excel Discussion (Misc queries) | |||
Macro stops before beginning. | Excel Programming | |||
macro stops midstream | Excel Programming | |||
Fill column macro that stops | Excel Programming |