LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default My Macro stops

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
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
Macro stops at random places. Jeff Excel Discussion (Misc queries) 0 May 16th 07 02:38 AM
Macro repeats and then stops Sabba Efie Excel Discussion (Misc queries) 2 August 15th 06 11:03 PM
Macro stops before beginning. y Excel Programming 7 April 12th 04 06:06 AM
macro stops midstream dvt[_2_] Excel Programming 3 February 23rd 04 03:46 PM
Fill column macro that stops DireWolf Excel Programming 2 January 1st 04 06:04 AM


All times are GMT +1. The time now is 12:12 AM.

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"