View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
active_x[_15_] active_x[_15_] is offline
external usenet poster
 
Posts: 1
Default how to rm the "extra row"?

how to rm the "extra row"?

In sheets("data_entry"), there is a column (Q) for "Dye Mode", where
some rows are EMPTY but NOT ALL.

After the "Make Sticker" button(in data_entry) is pressed, sticker
sheets are generated and a problem arises..

Problem:
In between each sticker, there should be ONLY ONE empty row.
The macro is ok IF ALL the cells in "Dye Mode" are FILLED, AND
REPLACE:
------------------------------------------------------------------------------------If
.Cells(rr, cDYE_MODE) < "" Then 'chk dye mode exist, if yes
'fill dye mode
Cells(rCurr + 1, cc + 2) = "(" & .Cells(rr, cDYE_MODE) & ")"
Else
rCurr = rCurr - 1 'rm row for dye mode
End If
------------------------------------------------------------------------------------WITH:
------------------------------------------------------------------------------------
'fill dye mode
Cells(rCurr + 1, cc + 2) = "(" & .Cells(rr, cDYE_MODE) & ")"
------------------------------------------------------------------------------------

However, in case ONLY SOME cells are filled, the macro generates ONE
MORE empty row, which is not desired to appear, between some stickers!


It seems that "rITEM" and "rCurr" in the vba cause this problem.

How to re-write the macro so that the "extra rows" do NOT arise?

File Attached: http://www.exceltip.com/forum/attach...?postid=290084 (help17.zip)

------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/