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: 70
Default Variable difficulties

Hi-
Can you tell me where I am wrong in regard to this code. Below I have noted
where it causes an error;



Sub MovePastTradesLoop()

'Define Variables
Dim TradesEnteredPast As Range, PastCheck As Range


With Sheets("Analysis")
Set TradesEnteredPast = Range("at17:at56")
End With


'Loop: Check for complete trades, copy to Trade History
For X = 1 To TradesEnteredPast.Count
Set PastCheck = TradesEnteredPast(X)



If PastCheck.Value = "True" Then

PastCheck.EntireRow.Select ERRORS OUT HERE
Selection.Copy
Sheets("TradeHistory").Select
Range("A4").Activate
Selection.End(xlDown).Select
ActiveCell.Offset(rowoffset:=1, columnoffset:=0).Activate
ActiveCell.EntireRow.Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("A1").Select
Sheets("Analysis").Select
Range("A1").Select
Else
MsgBox ("OK") 'Goes with Else. Comment out
Exit Sub 'Goes with Else. Comment it out.
End If
Next 'Ends "For Each" Loop


End Sub
 
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
Continuing Difficulties W/ Sum For Variable-length Column Chuckles123[_8_] Excel Programming 2 October 5th 04 05:43 AM
Continuing Difficulties W/ Sum For Variable-length Column Chuckles123[_13_] Excel Programming 0 October 5th 04 04:31 AM
Continuing Difficulties W/ Sum For Variable-length Column Chuckles123[_11_] Excel Programming 1 October 5th 04 03:28 AM
Continuing Difficulties W/ Sum For Variable-length Column Chuckles123[_3_] Excel Programming 3 October 4th 04 12:01 AM
Continuing Difficulties W/ Sum For Variable-length Column Chuckles123[_7_] Excel Programming 0 October 3rd 04 09:58 PM


All times are GMT +1. The time now is 08:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"