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: 287
Default An error in some code I did not write

Amoung other things the code say what you see below, but it hangs up on the
second to last line, "Cells(x, 16) = FORD.Offset(o, 13)" the code worked
last month when we used it. What might have changed in the spreadsheet to
make it hang up here?


x = Cells.Find(What:="*", SearchOrder:=xlByRows,
SearchDirection:=xlPrevious).Row + 1
Cells(x, 1).Select
ActiveSheet.Paste
x = Cells.Find(What:="*", SearchOrder:=xlByRows,
SearchDirection:=xlPrevious).Row

While x 1
ord = Cells(x, 1)
Set FORD = Sheets("ORDERHEAD").Columns("A:A").Find(What:=ord,
LookIn:=xlValues, lookat:=xlWhole)

Cells(x, 13) = FORD.Offset(0, 8) 'incom code EHIC
On Error Resume Next
Cells(x, 14) = Cells(x, 13) - Cells(x, 12)
On Error GoTo 0
Cells(x, 15) = Format("'" & Cells(x, 5), "") & Format(Cells(x, 12), "")
Cells(x, 16) = FORD.Offset(o, 13)
End If
 
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
could someone write me a VB code? thanks Morgan New Users to Excel 6 March 10th 10 01:20 PM
Write VB6 code to be used with VBA avi Excel Programming 1 April 8th 07 02:32 PM
Write code to Write Code Kstalker[_43_] Excel Programming 6 November 25th 05 12:30 AM
Code to write out all lines of code davidm Excel Programming 3 August 5th 05 04:26 AM
Application error when attempting to write code to a workbook Jared Excel Programming 1 November 17th 04 08:17 PM


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