View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default What is The ORng value after this code is run?

ORng is a range object pointing to the blank cell just below the data in
column A
Add this line of code to see what I mean...

Dim Inrng As Range
Dim ORng As Range
Dim inWs As Worksheet
Dim outWs As Worksheet
Dim iLastRow As Long

Set inWs = ActiveSheet
Set outWs = Worksheets("Order Form")
Set ORng = outWs.Cells(outWs.Cells(Rows.Count, 1).End(xlUp).Row + 1, "A")
msgbox ORng.address '***This new line will display the address


--
HTH...

Jim Thomlinson


"Roundy" wrote:

This is part of a shopping cart like application I am running. For some
reason, when items are added to the cart now, they go to the wrong place on
the sheet, I think this is the satetment I need to correct, but I don't have
enough understanding of it to make the corrections.

Dim Inrng As Range
Dim ORng As Range
Dim inWs As Worksheet
Dim outWs As Worksheet
Dim iLastRow As Long

Set inWs = ActiveSheet
Set outWs = Worksheets("Order Form")
Set ORng = outWs.Cells(outWs.Cells(Rows.Count, 1).End(xlUp).Row + 1, "A")


TIA