Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
Drop Down/List w/Code and Definition, only code entered when selec | Excel Worksheet Functions | |||
Code stops when high lighting (Chips code) | Excel Programming | |||
do anybody have a sample code for executing excel macro from vb code?<eom | Excel Programming | |||
stubborn Excel crash when editing code with code, one solution | Excel Programming |